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

php8.2 compat: add missing class properties #170

Merged
merged 14 commits into from
Jan 4, 2024
Merged

Conversation

falkenhawk
Copy link
Member

@falkenhawk falkenhawk commented May 18, 2023

ported from Shardj/zf1-future#278, Shardj/zf1-future#289 and Shardj/zf1-future#291 thanks @hungtrinh @glensc !

And added more fixes on top, which were not covered by the mentioned PRs.


Mitigate deprecation errors Deprecated: Creation of dynamic property {x} is deprecated which is thrown in php 8.2 and which are going to become fatal errors in php 9.

php 8.2 requires all properties to be declared before using them.
https://php.watch/versions/8.2/dynamic-properties-deprecated

replaces #145 and #169


followup to allow dynamic props in Zend_Form, Zend_Form_Element and Zend_View_Abstract#180

@falkenhawk falkenhawk marked this pull request as draft May 18, 2023 11:10
@falkenhawk falkenhawk force-pushed the php82-missing-props branch 4 times, most recently from 18e95d8 to 7343924 Compare May 18, 2023 13:24
@falkenhawk falkenhawk force-pushed the php82-missing-props branch 2 times, most recently from ce827da to c59c032 Compare May 29, 2023 18:40
@fredericgboutin-yapla
Copy link
Contributor

For what it is worth, I tried this branch and now all my 500 unit tests are passing and my website works on PHP 8.2.

Keep up the great work 👍 🙏

@Voltisky
Copy link

Voltisky commented Aug 3, 2023

Is there a release plan?
Maybe some help is needed to speed up the implementation process.

@falkenhawk
Copy link
Member Author

Sure, any help would be greatly appreciated :)

There are still 3 failures and 200+ errors, see the php 8.2 workflow. @maksimovic addressed memcache issues in #169 but those fixes still need to be extracted to a separate PR.

Most of the issues are triggered by accessing dynamic props on Zend view and form element.

And there are a bunch of smaller ones.

@Voltisky
Copy link

Sure, any help would be greatly appreciated :)

There are still 3 failures and 200+ errors, see the php 8.2 workflow. @maksimovic addressed memcache issues in #169 but those fixes still need to be extracted to a separate PR.

Most of the issues are triggered by accessing dynamic props on Zend view and form element.

And there are a bunch of smaller ones.

Good.
We will probably have resources to help prepare for PHP 8.2.
Can we separate specific feature to work on ?

@4ndrzej
Copy link

4ndrzej commented Nov 22, 2023

I can help, but could you please guide me on how I can get started and what should I do?

hungtrinh and others added 13 commits January 3, 2024 10:53
Fixing issues on PHP 8.2 like
> Deprecated: Creation of dynamic property {x} is deprecated

Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
Co-authored-by: Elan Ruusamäe <glen@pld-linux.org>
(cherry picked from commit 65c1385dce02591d31b1165283ed7f8e018badfd)
Co-authored-by: hungtd <trinhduchung@gmail.com>
(cherry picked from commit bdbfa1dcda95797a74a6cb5f80890e606b23f239)
as Zend_Controller_Action_Helper_ContextSwitch uses that
php 8.2+ needs this
otherwise `stream_wrapper_register('php', 'Zend_AllTests_StreamWrapper_PhpInput');`
triggers `Creation of dynamic property Zend_AllTests_StreamWrapper_PhpInput::$context is deprecated`
Creation of dynamic property PHPUnit_Extensions_Database_DataSet_CompositeDataSet::$motherDataset is deprecated
in (probably defunc for a long time already) service components
and tests
@falkenhawk falkenhawk changed the base branch from master to php82 January 3, 2024 12:24
@falkenhawk falkenhawk marked this pull request as ready for review January 3, 2024 12:25
@falkenhawk falkenhawk merged commit 9cc3d3f into php82 Jan 4, 2024
12 checks passed
@falkenhawk falkenhawk deleted the php82-missing-props branch January 4, 2024 12:03
@falkenhawk falkenhawk restored the php82-missing-props branch January 4, 2024 12:03
@falkenhawk falkenhawk mentioned this pull request Jan 4, 2024
@falkenhawk falkenhawk deleted the php82-missing-props branch January 4, 2024 12:36
@falkenhawk falkenhawk mentioned this pull request Jan 4, 2024
@falkenhawk
Copy link
Member Author

1.15.3 is released now, bringing compatibility with php 8.2 & 8.3.

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

Successfully merging this pull request may close these issues.

6 participants