PrinsFrank
Repos
22
Followers
45
Following
56

A collection of standards as PHP Enums: ISO3166, ISO4217, ISO639...

261
10

Generate and display maps without external services or compromising on privacy.

142
2

Source for my personal blog

2
0

Validated properties in PHP8.1 and above using attribute rules

22
2

Subfolder split of nvkelso/natural-earth-vector that only contains the geojson files to limit download sizes

2
0

This project is a work in progress. Please don't use this in a production environment.

0
0

Events

Created at 16 hours ago
started
Created at 16 hours ago

Add link to newly created PR in Larastan

Created at 3 days ago
issue comment
Add a rule disallowing the usage of global helper functions that depend on a booted application

@mad-briller Yes, that is also the case.

I spent a couple more evenings on the ordering issue in test, where the newly added tests break tests further on. As it looks right now; As PHPStan is not built te be run on part of the code, the container is cached only based on the additional configuration. As that is the same for all test cases in the folder, the cached container is used for all test cases, but because the individual tests are only run on single files, it doesn't run as expected. I removed the test cases for now. I will further debug the container issues in the phpstan base test case, but it will take a few weeks before I have some more time to do a deep dive.

Created at 3 days ago

Add a rule disallowing the usage of global helper functions that depend on a booted application

Created at 3 days ago

Update README.md

Created at 3 days ago

Add a rule disallowing the usage of global helper functions that depend on a booted application

Created at 5 days ago

Slightly increase memory limit to allow for file with lots of functions&errors to be processed

Created at 5 days ago
issue comment
Add a rule disallowing the usage of global helper functions that depend on a booted application

So to clarify, I currently have two issues:

  • Memory increases whenever a new call to now() or today() is added and analyzed by phpstan.
  • A test execution order issue where the RelationExistenceRule test case is now broken because the newly added test is executed before it.

I was fed up with the memory issue as I wanted to go to sleep, so added the ridiculous new limit to see if my tests are at least passing, but that is not the case. I had a long day, so will continue debugging tomorrow. I suspect right now that part of the fix lies in the way the container is cached based on the sha1 of the additionalConfigFiles but not on the analyzed file set and that pollutes the phpstan container, but have to do some more research on that in the upcoming days.

Created at 6 days ago

Revert memory limit changes for phpstan

Created at 6 days ago
issue comment
Add a rule disallowing the usage of global helper functions that depend on a booted application

@szepeviktor I removed my comment within seconds of posting it because I was not entirely sure what was happening. The actual test case adds about 40mb of memory, but more things are going on the second i add any reference to now() or today(), but also the RelationExstinceRule test is failing the moment I add new tests for this rule. I am currently deep in the source code op PHPStan, the current suspect is the static $containers property in the PHPStanTestCase, but I am unsure atm.

Created at 6 days ago

Remove date functions from test cases

Created at 6 days ago

Remove arguments from laravel helpers in decoupled function call test as they are not required for the static analysis

Remove duplicate function

Update memory limit to allow for the new tests to run

Created at 6 days ago
issue comment
Add a rule disallowing the usage of global helper functions that depend on a booted application

@szepeviktor @canvural I found the source of the memory increase. As the now() and today() function calls are resolved using the DateExtension, and that date extension actually calls the now() function, the memory increases by 50mb as a container is resolved. As the idea is probably that the dateExtension is returns the correct type even if the function is overwritten, I can't really fix that. Is there something I can do here to solve this?

Created at 6 days ago

Use contracts/interfaces as suggestions for DI-ing whenever possible

Created at 6 days ago

Use contracts/interfaces as suggestions for DI-ing whenever possible

Created at 6 days ago

Increase memory limit

Created at 6 days ago

feat: expand docblock of JoinSub to allow other models (#1352)

  • Expand docblock of JoinSub to allow other models

The previous version of this docblock used the template TModelClass. However, this template was already in use at the class level, effectively limiting the argument to joinSub to be a QueryBuilder of the same type.

The test proved that this was allowed:

User::query()->joinSub(
    User::query()->whereIn('id', [1, 2, 3]),
    'users',
    'users.id',
    'users.id'
);

However, in the wild, I noticed that User::query()->joinSub(Post::query(), ...) was not allowed.

This change fixes that, simply by renaming the template in the joinSub docblock.

  • Add joinSub adjustment to changelog

Merge remote-tracking branch 'origin/master' into ad-decoupled-code-rule

Conflicts:

CHANGELOG.md

Created at 6 days ago

feat: expand docblock of JoinSub to allow other models (#1352)

  • Expand docblock of JoinSub to allow other models

The previous version of this docblock used the template TModelClass. However, this template was already in use at the class level, effectively limiting the argument to joinSub to be a QueryBuilder of the same type.

The test proved that this was allowed:

User::query()->joinSub(
    User::query()->whereIn('id', [1, 2, 3]),
    'users',
    'users.id',
    'users.id'
);

However, in the wild, I noticed that User::query()->joinSub(Post::query(), ...) was not allowed.

This change fixes that, simply by renaming the template in the joinSub docblock.

  • Add joinSub adjustment to changelog
Created at 6 days ago

Add a rule disallowing the usage of global helper functions that depend on a booted application

Created at 6 days ago

Rewrite spec update retry mechanism

Created at 1 week ago
delete branch
PrinsFrank delete branch add-retry-for-failing-tests
Created at 1 week ago

Add incremental backoff to spec updating so manual retries are not necessary anymore

Merge pull request #46 from PrinsFrank/add-retry-for-failing-tests

Add incremental backoff to spec updating so manual retries are not ne…

Created at 1 week ago
pull request closed
Add incremental backoff to spec updating so manual retries are not ne…

…cessary anymore

Created at 1 week ago
pull request opened
Add incremental backoff to spec updating so manual retries are not ne…

…cessary anymore

Created at 1 week ago
create branch
PrinsFrank create branch add-retry-for-failing-tests
Created at 1 week ago