-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.0 "attribute" use statement incorrectly prefixed or breaks prefixing entirely #539
Labels
Comments
moorscode
added a commit
to Yoast/wordpress-seo
that referenced
this issue
Oct 28, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Oct 28, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
moorscode
changed the title
PHP 8.0 Parameter use statement incorrectly prefixed
PHP 8.0 "parameter" use statement incorrectly prefixed or breaks prefixing entirely
Oct 28, 2021
moorscode
changed the title
PHP 8.0 "parameter" use statement incorrectly prefixed or breaks prefixing entirely
PHP 8.0 "attribute" use statement incorrectly prefixed or breaks prefixing entirely
Oct 28, 2021
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Nov 11, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Nov 30, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Nov 30, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 6, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 9, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 16, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 16, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 20, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implenetation of the JSONSerializableInterface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and was not worked as desired on the newer version. Bumping the version in this commit seemed out of scope. This is addressed in the following ticket: humbug/php-scoper#539
jrfnl
pushed a commit
to Yoast/wordpress-seo
that referenced
this issue
Dec 23, 2021
PHP Scoper is prefixing the attribute use statement that will need to be pulled into the TheLeague OAuth Client implementation of the `JSONSerializable` interface. See thephpleague/oauth2-client#919 This change removes the prefix from the use statement. PHP Scoper was updated to 0.15.0 during investigation of this issue and it still does not work as desired on the newer version. Bumping the version in this commit seemed out of scope. PHP 8.1 compatibility for PHP Scoper is being tracked in the following ticket: humbug/php-scoper#539
1 task
Will be fixed in the next release. Not entirely sure if it's capture completely by #738, but I tried scoping the reproducer repository with the latest state of |
Happy to hear that. Thank you @theofidry ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Prefixing of PHP 8.0+ attributes is not behaving consistently.
When using a single line attribute, which is imported using a
use
statement, the class in the use statement is being prefixed.However, when using the fully qualified classname in the inline attribute call
or using a multiline attribute notationthe build files are created with expected prefixes (the incorrect prefix is not being added).Correction on the assumption that multiline attributes were giving the desired results.
Whenever an attribute is defined over multiple lines, the "source" file is being placed in the build directory without any errors or warnings, but also without any prefixes.
I've added a "neutral"
use SomethingElse;
to the source files to validate that prefixing happens, though this statement is not being prefixed in themultiline-*.php
files in the build results.Steps to reproduce:
composer install
php ./vendor/humbug/php-scoper/bin/php-scoper add-prefix
build
directory and seeuse TestPrefix\ReturnTypeWillChange;
instead of theuse ReturnTypeWillChange;
statement in theinline-with-use.php
fileThe text was updated successfully, but these errors were encountered: