Comments (10)
if i get the time ill try and whip up a reproducible repo. This is really bugging me :)
from rector.
@chrillep Thanks for provided files. This is really autoload issue with Wordpress, it loads this file first https://core.trac.wordpress.org/browser/tags/6.4.2/src/wp-admin/includes/noop.php#L18 and then suggests Rector that this method has no arguments.
Not how Rector or PHPStan can be helpful at Wordpress if the autoload is providing false information. Could be dead end by Wordpress design.
Instead I'd suggest to skip rules like RemoveExtraParametersRector
using skip()
method in rector.php
:
https://getrector.com/documentation/ignoring-rules-or-paths
from rector.
Duplicate with #7894
function seems not autoloaded, or too late loaded, you can read the doc for how to solve it https://getrector.com/documentation/static-reflection-and-autoload
from rector.
I dont' understand?
I'ts only happening in CI ?
locally its fine.
the exact same composer commands are ran.
this started happening with
"rector/rector": "^0.18.12",
ill try and get to the bottom of the differences.
in the meantime we are using bedrock and sage which is basicly WP for composer.
So it already autoloads from vendor
https://roots.io/bedrock/
https://roots.io/sage/
https://roots.io/acorn/
from rector.
are you saying i should load all the files needed before the autoloading is done ?
for example l10n.php ?
from rector.
Yes, functions need to be registered as files in composer,
https://stackoverflow.com/questions/24171078/composer-psr-how-to-autoload-functions
On rector use case, you can place under autoload-dev
or you can define custom bootstrap for it.
from rector.
ill try but it still does not explain why it works locally :)
from rector.
yeah, thank u. I used the RemoveExtraParametersRector class.
But for me and my colleagues, its still a conundrum as to why this works locally
without RemoveExtraParametersRector and not in the ci.
Seeing as you are the creator of this repo, ill just use the RemoveExtraParametersRector :).
from rector.
@chrillep That could be caused by autoload order. E.g. I know that Windows, Unix and OSx order same files differently. This is being used by Composer internals and could result in prioritizing one file over another.
from rector.
Aaah ok . Yeah we use OS X locally. And GitHub Ci is Ubuntu/ linux by default .
Thank you for the Peace of mind 🙏
from rector.
Related Issues (20)
- Import names combines import aliases HOT 1
- Unable to run composer install on rector-src fork HOT 2
- `ReadOnlyPropertyRector` ignores properties being written inside a used trait HOT 1
- FinalizeTestCaseClassRector removes newlines HOT 1
- Could not resolve PHP level set list for "80199" HOT 1
- Incorrect behavior of RestoreDefaultNullToNullableTypePropertyRector
- Code with looping over larger arrays from constants causes rector to be stuck while memory usage is increasing unusually high HOT 9
- Unnecessary code removal by the RemoveDeadLoopRector HOT 3
- Class `Rector\RectorGenerator\Exception\ConfigurationException` not found HOT 1
- SetList::PRIVATIZATION overwrites the previously configured paths HOT 2
- The `Rector\Php80\Rector\Class_\AnnotationToAttributeRector` rule requires configuration HOT 1
- Could not process file, due to: "System error: "Internal error." HOT 5
- RemoveAlwaysElseRector creates fatal error HOT 1
- CombineIfRector creates fatal error when PHP closing tag at end of if HOT 3
- Vendor directory detection is too naive HOT 2
- Incorrect behavior of AddMethodCallBasedStrictParamTypeRector, ReturnTypeFromStrictBoolReturnExprRector, ReturnUnionTypeRector HOT 1
- Incorrect behavior of `NullToStrictStringFuncCallArgRector` HOT 1
- Incorrect behavior of ReturnTypeFromStrictNewArrayRector HOT 2
- Incorrect behavior of RemoveUnusedPromotedPropertyRector
- `DowngradeLevelSetList` to PHP <8.1 in Rector Versions >0.18.5 Cannot Be Run On PHP Versions <8.1 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rector.