Skip to content
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.2 support #1135

Open
Sweetchuck opened this issue Dec 20, 2022 · 3 comments
Open

PHP 8.2 support #1135

Sweetchuck opened this issue Dec 20, 2022 · 3 comments

Comments

@Sweetchuck
Copy link
Contributor

Sweetchuck commented Dec 20, 2022

According to the README.md non of the 3.x or 4.x branches support PHP 8.2,
but I think sooner or later PHP 8.2 should be supported, at least by the 4.x branch.

consolidation/robo:3.0.11 with PHP 8.2 the Exec task throws the following deprecation message:

Deprecated: Use of "self" in callables is deprecated in /.../src/Task/Base/Exec.php on line 66

There might be other problems as well.

@chapterjason
Copy link
Contributor

Has already been fixed in #1131 unfortunately you have to build it yourself locally.

git clone [email protected]:consolidation/robo.git
cd robo
git checkout 4.x
composer install
./robo phar:build
mv robo.phar /usr/local/bin/robo

Should do it.

@Sweetchuck
Copy link
Contributor Author

Thank you for you reply.

Yes, I saw the fix in the 4.x branch, but I think the Robo-3.x branch also should support PHP 8.2, because it is widely used and if the fix is easy like that.

The README.md should be clear about that which branches accept PHP-8.2 related merge requests.

I have several (~18) reusable Robo-3.x tasks, and I already make them compatible with PHP 8.2. (I noticed this issue during the update).
I would like to know that if I have to open a new branch and set the dependency to consolidation/robo^4.0 in order to support PHP-8.2.

I might be wrong, but with the current situation a Drupal-9.x project which uses Robo-3.x can't upgrade to PHP 8.2. (I know that there is Drupal-10, but still)

@greg-1-anderson
Copy link
Member

I'll accept PRs that backport PHP 8.2 support to the 3.x branch.

Note that although test coverage of the core Robo classes is very good, there are a lot of standard Robo tasks that have little to no coverage. This means that things like "supports PHP 8.2" PRs often have to happen iteratively, because it's easy to miss needed changes in uncovered classes. PRs with more tests would be particularly welcome.

Sweetchuck added a commit to Sweetchuck/consolidation-robo that referenced this issue Dec 28, 2022
alex-mailpoet added a commit to mailpoet/mailpoet that referenced this issue Jan 26, 2023
[MAILPOET-4900]

When a new robo version with a fix for 'self' in callables is released,
this patch can be removed. Check here:
consolidation/robo#1135
alex-mailpoet added a commit to mailpoet/mailpoet that referenced this issue Jan 26, 2023
[MAILPOET-4900]

When a new robo version with a fix for 'self' in callables is released,
this patch can be removed. Check here:
consolidation/robo#1135
veljkho pushed a commit to mailpoet/mailpoet that referenced this issue Jan 30, 2023
[MAILPOET-4900]

When a new robo version with a fix for 'self' in callables is released,
this patch can be removed. Check here:
consolidation/robo#1135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants