Skip to content

Commit

Permalink
Merge pull request #10921 from forsdahl/php8.2-compatibility
Browse files Browse the repository at this point in the history
PHP 8.2 compatibility fixes
  • Loading branch information
kinglozzer authored Aug 29, 2023
2 parents 2e92b89 + 88c70b3 commit 2c577aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* For example, the "URLSegment" field in a standard CMS form would be
* accessible through "admin/EditForm/field/URLSegment/FieldHolder".
*/
#[\AllowDynamicProperties]
class Form extends ViewableData implements HasRequestHandler
{
use AttributesHTML;
Expand Down
1 change: 1 addition & 0 deletions src/ORM/Connect/MySQLDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* You are advised to backup your tables if changing settings on an existing database
* `connection_charset` and `charset` should be equal, similarly so should `connection_collation` and `collation`
*/
#[\AllowDynamicProperties]
class MySQLDatabase extends Database implements TransactionManager
{
use Configurable;
Expand Down
5 changes: 5 additions & 0 deletions thirdparty/php-peg/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Of course, the next regex might be outside that bracket - after the bracket if other matches have progressed beyond the match position, or before
* the bracket if a failed match + restore has moved the current position backwards - so we have to check that too.
*/
#[\AllowDynamicProperties]
class ParserRegexp {
function __construct( $parser, $rx ) {
$this->parser = $parser ;
Expand Down Expand Up @@ -44,6 +45,7 @@ function match() {
* - some abstraction of code that would otherwise be repeated many times in a compiled grammer, mostly related to calling user functions
* for result construction and building
*/
#[\AllowDynamicProperties]
class Parser {
/**
* @var string
Expand Down Expand Up @@ -202,6 +204,7 @@ function store ( &$result, $subres, $storetag = NULL ) {
*
* @author Hamish Friedlander
*/
#[\AllowDynamicProperties]
class Packrat extends Parser {
function __construct( $string ) {
parent::__construct( $string ) ;
Expand Down Expand Up @@ -254,6 +257,7 @@ function packwrite( $key, $pos, $res ) {
*
* @author Hamish Friedlander
*/
#[\AllowDynamicProperties]
class FalseOnlyPackrat extends Parser {
function __construct( $string ) {
parent::__construct( $string ) ;
Expand Down Expand Up @@ -288,6 +292,7 @@ function packwrite( $key, $pos, $res ) {
*
* @author Hamish Friedlander
*/
#[\AllowDynamicProperties]
class ConservativePackrat extends Parser {
function packhas( $key, $pos ) {
return isset( $this->packres[$key] ) && $this->packres[$key] !== NULL ;
Expand Down

0 comments on commit 2c577aa

Please sign in to comment.