From 1380cc90cd3089e30316a6201e96fdbaac2aa167 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Wed, 23 Oct 2024 00:06:08 -0600 Subject: [PATCH] Upgrade to laravel-doctrine-orm 3.0.0 --- composer.json | 2 +- composer.lock | 434 +++--------------- ...LaravelDoctrineApiKeyEntityAccessEvent.php | 286 ++---------- ...sLaravelDoctrineApiKeyEntityAdminEvent.php | 286 ++---------- ...etonsLaravelDoctrineApiKeyEntityApiKey.php | 426 ++--------------- ...letonsLaravelDoctrineApiKeyEntityScope.php | 273 +---------- .../__CG__AppDoctrineORMEntityArtist.php | 225 +-------- .../__CG__AppDoctrineORMEntityPerformance.php | 236 +--------- .../__CG__AppDoctrineORMEntityRecording.php | 227 +-------- .../__CG__AppDoctrineORMEntityUser.php | 231 +--------- 10 files changed, 261 insertions(+), 2365 deletions(-) diff --git a/composer.json b/composer.json index db9f9b9..999d1bc 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "api-skeletons/laravel-doctrine-apikey": "~2.0.2", "api-skeletons/laravel-doctrine-data-fixtures": "^1.0", "guzzlehttp/guzzle": "^7.2", - "laravel-doctrine/orm": "^2.0", + "laravel-doctrine/orm": "^3.0.0", "laravel/framework": "^10.0", "laravel/tinker": "^2.8", "mll-lab/laravel-graphiql": "^3.2" diff --git a/composer.lock b/composer.lock index bd1f5b5..6211246 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c54fe32598a8bfd4183586e941dc4f8d", + "content-hash": "ec3f149aadb0b1acf79643706a350adb", "packages": [ { "name": "api-skeletons/doctrine-orm-graphql", @@ -446,82 +446,6 @@ }, "time": "2024-07-08T12:26:09+00:00" }, - { - "name": "doctrine/annotations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/901c2ee5d26eb64ff43c47976e114bf00843acf7", - "reference": "901c2ee5d26eb64ff43c47976e114bf00843acf7", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^2 || ^3", - "ext-tokenizer": "*", - "php": "^7.2 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^2.0", - "doctrine/coding-standard": "^10", - "phpstan/phpstan": "^1.10.28", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "symfony/cache": "^5.4 || ^6.4 || ^7", - "vimeo/psalm": "^4.30 || ^5.14" - }, - "suggest": { - "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/2.0.2" - }, - "time": "2024-09-05T10:17:24+00:00" - }, { "name": "doctrine/cache", "version": "2.2.0", @@ -701,97 +625,6 @@ ], "time": "2024-04-18T06:56:21+00:00" }, - { - "name": "doctrine/common", - "version": "3.4.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/6c8fef961f67b8bc802ce3e32e3ebd1022907286", - "reference": "6c8fef961f67b8bc802ce3e32e3ebd1022907286", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0 || ^3.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "doctrine/collections": "^1", - "phpstan/phpstan": "^1.4.1", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^6.1", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.4.5" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "time": "2024-10-08T15:53:43+00:00" - }, { "name": "doctrine/data-fixtures", "version": "1.7.0", @@ -1433,63 +1266,51 @@ }, { "name": "doctrine/orm", - "version": "2.20.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c" + "reference": "69958152e661aa9c14e80d1ee4962863485aa60b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/8ed6c2234aba019f9737a6bcc9516438e62da27c", - "reference": "8ed6c2234aba019f9737a6bcc9516438e62da27c", + "url": "https://api.github.com/repos/doctrine/orm/zipball/69958152e661aa9c14e80d1ee4962863485aa60b", + "reference": "69958152e661aa9c14e80d1ee4962863485aa60b", "shasum": "" }, "require": { "composer-runtime-api": "^2", - "doctrine/cache": "^1.12.1 || ^2.1.1", - "doctrine/collections": "^1.5 || ^2.1", - "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.13.1 || ^3.2", + "doctrine/collections": "^2.2", + "doctrine/dbal": "^3.8.2 || ^4", "doctrine/deprecations": "^0.5.3 || ^1", "doctrine/event-manager": "^1.2 || ^2", "doctrine/inflector": "^1.4 || ^2.0", "doctrine/instantiator": "^1.3 || ^2", - "doctrine/lexer": "^2 || ^3", - "doctrine/persistence": "^2.4 || ^3", + "doctrine/lexer": "^3", + "doctrine/persistence": "^3.3.1", "ext-ctype": "*", - "php": "^7.1 || ^8.0", + "php": "^8.1", "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^4.2 || ^5.0 || ^6.0 || ^7.0", - "symfony/polyfill-php72": "^1.23", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "doctrine/annotations": "<1.13 || >= 3.0" + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/var-exporter": "^6.3.9 || ^7.0" }, "require-dev": { - "doctrine/annotations": "^1.13 || ^2", - "doctrine/coding-standard": "^9.0.2 || ^12.0", - "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/extension-installer": "~1.1.0 || ^1.4", - "phpstan/phpstan": "~1.4.10 || 1.12.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "doctrine/coding-standard": "^12.0", + "phpbench/phpbench": "^1.0", + "phpdocumentor/guides-cli": "^1.4", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "1.12.6", + "phpstan/phpstan-deprecation-rules": "^1.2", + "phpunit/phpunit": "^10.4.0", "psr/log": "^1 || ^2 || ^3", "squizlabs/php_codesniffer": "3.7.2", - "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0", - "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0", - "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0", - "vimeo/psalm": "4.30.0 || 5.24.0" + "symfony/cache": "^5.4 || ^6.2 || ^7.0", + "vimeo/psalm": "5.24.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0" }, - "bin": [ - "bin/doctrine" - ], "type": "library", "autoload": { "psr-4": { @@ -1530,9 +1351,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.20.0" + "source": "https://github.com/doctrine/orm/tree/3.3.0" }, - "time": "2024-10-11T11:47:24+00:00" + "time": "2024-10-12T20:07:18+00:00" }, { "name": "doctrine/persistence", @@ -2445,45 +2266,46 @@ }, { "name": "laravel-doctrine/orm", - "version": "2.1.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/laravel-doctrine/orm.git", - "reference": "71eb6edc8a65b99df3b379bb1cd2c69634bc94c5" + "reference": "c50f7a7269d985f2835547474532595c05d663fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel-doctrine/orm/zipball/71eb6edc8a65b99df3b379bb1cd2c69634bc94c5", - "reference": "71eb6edc8a65b99df3b379bb1cd2c69634bc94c5", + "url": "https://api.github.com/repos/laravel-doctrine/orm/zipball/c50f7a7269d985f2835547474532595c05d663fa", + "reference": "c50f7a7269d985f2835547474532595c05d663fa", "shasum": "" }, "require": { - "doctrine/annotations": "^2", - "doctrine/dbal": "^3.2", - "doctrine/orm": "^2.14", - "doctrine/persistence": "^3", - "illuminate/auth": "^9.0|^10.0|^11.0", - "illuminate/console": "^9.0|^10.0|^11.0", - "illuminate/container": "^9.0|^10.0|^11.0", - "illuminate/contracts": "^9.0|^10.0|^11.0", - "illuminate/pagination": "^9.0|^10.0|^11.0", - "illuminate/routing": "^9.0|^10.0|^11.0", - "illuminate/support": "^9.0|^10.0|^11.0", - "illuminate/validation": "^9.0|^10.0|^11.0", - "illuminate/view": "^9.0|^10.0|^11.0", - "php": "^8.0", + "doctrine/dbal": "^3.0 || ^4.0", + "doctrine/orm": "^3.1", + "doctrine/persistence": "^3.3", + "illuminate/auth": "^10.0|^11.0", + "illuminate/console": "^10.0|^11.0", + "illuminate/container": "^10.0|^11.0", + "illuminate/contracts": "^10.0|^11.0", + "illuminate/pagination": "^10.0|^11.0", + "illuminate/routing": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/validation": "^10.0|^11.0", + "illuminate/view": "^10.0|^11.0", + "php": "^8.1", "symfony/cache": "^6.0|^7.0", - "symfony/serializer": "^5.0|^6.0|^7.0", - "symfony/yaml": "^5.0|^6.0|^7.0" + "symfony/serializer": "^5.0|^6.0|^7.0" }, "conflict": { "laravel/lumen": "*" }, "require-dev": { - "illuminate/log": "^9.0|^10.0|^11.0", - "illuminate/notifications": "^9.0|^10.0|^11.0", - "illuminate/queue": "^9.0|^10.0|^11.0", - "mockery/mockery": "^1.3.1", + "doctrine/coding-standard": "^12.0", + "illuminate/log": "^10.0|^11.0", + "illuminate/notifications": "^10.0|^11.0", + "illuminate/queue": "^10.0|^11.0", + "mockery/mockery": "^1.6.12", + "nikic/php-parser": "^4.19 || ^5.0", + "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.1", "phpunit/phpunit": "^9.3" @@ -2525,6 +2347,10 @@ { "name": "Patrick Brouwers", "email": "patrick@maatwebsite.nl" + }, + { + "name": "Tom H Anderson", + "email": "tom.h.anderson@gmail.com" } ], "description": "A Doctrine ORM bridge for Laravel 5", @@ -2537,7 +2363,7 @@ ], "support": { "issues": "https://github.com/laravel-doctrine/orm/issues", - "source": "https://github.com/laravel-doctrine/orm/tree/2.1.0" + "source": "https://github.com/laravel-doctrine/orm/tree/3.0.0" }, "funding": [ { @@ -2545,7 +2371,7 @@ "type": "github" } ], - "time": "2024-05-13T06:51:26+00:00" + "time": "2024-10-22T01:19:54+00:00" }, { "name": "laravel/framework", @@ -6227,71 +6053,6 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", - "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "metapackage", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.31.0", @@ -7348,77 +7109,6 @@ ], "time": "2024-06-28T08:00:31+00:00" }, - { - "name": "symfony/yaml", - "version": "v7.1.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "4e561c316e135e053bd758bf3b3eb291d9919de4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/4e561c316e135e053bd758bf3b3eb291d9919de4", - "reference": "4e561c316e135e053bd758bf3b3eb291d9919de4", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "symfony/console": "^6.4|^7.0" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v7.1.5" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-17T12:49:58+00:00" - }, { "name": "tijsverkoyen/css-to-inline-styles", "version": "v2.2.7", @@ -9748,16 +9438,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.36", + "version": "10.5.37", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870" + "reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870", - "reference": "aa0a8ce701ea7ee314b0dfaa8970dc94f3f8c870", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c7cffa0efa2b70c22366523e6d804c9419eb2400", + "reference": "c7cffa0efa2b70c22366523e6d804c9419eb2400", "shasum": "" }, "require": { @@ -9778,7 +9468,7 @@ "phpunit/php-timer": "^6.0.0", "sebastian/cli-parser": "^2.0.1", "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.2", + "sebastian/comparator": "^5.0.3", "sebastian/diff": "^5.1.1", "sebastian/environment": "^6.1.0", "sebastian/exporter": "^5.1.2", @@ -9829,7 +9519,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.36" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.37" }, "funding": [ { @@ -9845,7 +9535,7 @@ "type": "tidelift" } ], - "time": "2024-10-08T15:36:51+00:00" + "time": "2024-10-19T13:03:41+00:00" }, { "name": "sebastian/cli-parser", diff --git a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAccessEvent.php b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAccessEvent.php index e6ca208..91dbcff 100644 --- a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAccessEvent.php +++ b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAccessEvent.php @@ -2,282 +2,48 @@ namespace DoctrineProxies\__CG__\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class AccessEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent implements \Doctrine\ORM\Proxy\Proxy +class AccessEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - - - - - - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'url', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'apiKey']; - } - - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'url', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'apiKey']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (AccessEvent $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); + $this->initializeLazyObject(); } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure - { - return $this->__cloner__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; - } - - /** - * {@inheritDoc} - */ - public function setIpAddress($ipAddress) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIpAddress', [$ipAddress]); - - return parent::setIpAddress($ipAddress); - } - - /** - * {@inheritDoc} - */ - public function getIpAddress() - { - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIpAddress', []); + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + "\0".parent::class."\0".'apiKey' => [parent::class, 'apiKey', null], + "\0".parent::class."\0".'created_at' => [parent::class, 'created_at', null], + "\0".parent::class."\0".'id' => [parent::class, 'id', null], + "\0".parent::class."\0".'ip_address' => [parent::class, 'ip_address', null], + "\0".parent::class."\0".'url' => [parent::class, 'url', null], + 'apiKey' => [parent::class, 'apiKey', null], + 'created_at' => [parent::class, 'created_at', null], + 'id' => [parent::class, 'id', null], + 'ip_address' => [parent::class, 'ip_address', null], + 'url' => [parent::class, 'url', null], + ]; - return parent::getIpAddress(); - } - - /** - * {@inheritDoc} - */ - public function setUrl($url) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUrl', [$url]); - - return parent::setUrl($url); - } - - /** - * {@inheritDoc} - */ - public function getUrl() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUrl', []); - - return parent::getUrl(); - } - - /** - * {@inheritDoc} - */ - public function setCreatedAt($createdAt) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedAt', [$createdAt]); - - return parent::setCreatedAt($createdAt); - } - - /** - * {@inheritDoc} - */ - public function getCreatedAt() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', []); - - return parent::getCreatedAt(); - } - - /** - * {@inheritDoc} - */ - public function getId() - { - if ($this->__isInitialized__ === false) { - return parent::getId(); - } - - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []); - - return parent::getId(); - } - - /** - * {@inheritDoc} - */ - public function setApiKey(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey $apiKey) + public function __isInitialized(): bool { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setApiKey', [$apiKey]); - - return parent::setApiKey($apiKey); + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - */ - public function getApiKey() + public function __serialize(): array { + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getApiKey', []); - - return parent::getApiKey(); + return $properties; } - } diff --git a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAdminEvent.php b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAdminEvent.php index 16b7e2f..68e03c2 100644 --- a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAdminEvent.php +++ b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityAdminEvent.php @@ -2,282 +2,48 @@ namespace DoctrineProxies\__CG__\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class AdminEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AdminEvent implements \Doctrine\ORM\Proxy\Proxy +class AdminEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AdminEvent implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - - - - - - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'event', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'apiKey']; - } - - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'event', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AdminEvent' . "\0" . 'apiKey']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (AdminEvent $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); + $this->initializeLazyObject(); } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure - { - return $this->__cloner__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; - } - - /** - * {@inheritDoc} - */ - public function setIpAddress($ipAddress) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIpAddress', [$ipAddress]); - - return parent::setIpAddress($ipAddress); - } - - /** - * {@inheritDoc} - */ - public function getIpAddress() - { - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIpAddress', []); + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + "\0".parent::class."\0".'apiKey' => [parent::class, 'apiKey', null], + "\0".parent::class."\0".'created_at' => [parent::class, 'created_at', null], + "\0".parent::class."\0".'event' => [parent::class, 'event', null], + "\0".parent::class."\0".'id' => [parent::class, 'id', null], + "\0".parent::class."\0".'ip_address' => [parent::class, 'ip_address', null], + 'apiKey' => [parent::class, 'apiKey', null], + 'created_at' => [parent::class, 'created_at', null], + 'event' => [parent::class, 'event', null], + 'id' => [parent::class, 'id', null], + 'ip_address' => [parent::class, 'ip_address', null], + ]; - return parent::getIpAddress(); - } - - /** - * {@inheritDoc} - */ - public function setEvent($event) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setEvent', [$event]); - - return parent::setEvent($event); - } - - /** - * {@inheritDoc} - */ - public function getEvent() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEvent', []); - - return parent::getEvent(); - } - - /** - * {@inheritDoc} - */ - public function setCreatedAt($createdAt) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedAt', [$createdAt]); - - return parent::setCreatedAt($createdAt); - } - - /** - * {@inheritDoc} - */ - public function getCreatedAt() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', []); - - return parent::getCreatedAt(); - } - - /** - * {@inheritDoc} - */ - public function getId() - { - if ($this->__isInitialized__ === false) { - return parent::getId(); - } - - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []); - - return parent::getId(); - } - - /** - * {@inheritDoc} - */ - public function setApiKey(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey $apiKey) + public function __isInitialized(): bool { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setApiKey', [$apiKey]); - - return parent::setApiKey($apiKey); + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - */ - public function getApiKey() + public function __serialize(): array { + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getApiKey', []); - - return parent::getApiKey(); + return $properties; } - } diff --git a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityApiKey.php b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityApiKey.php index 1343565..69dd8b6 100644 --- a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityApiKey.php +++ b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityApiKey.php @@ -2,414 +2,56 @@ namespace DoctrineProxies\__CG__\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class ApiKey extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey implements \Doctrine\ORM\Proxy\Proxy +class ApiKey extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - - - - - - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'name', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'api_key', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'is_active', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'status_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'accessEvents', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'adminEvents', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'scopes']; - } - - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'name', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'api_key', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'is_active', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'status_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'accessEvents', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'adminEvents', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\ApiKey' . "\0" . 'scopes']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (ApiKey $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure - { - return $this->__cloner__; + $this->initializeLazyObject(); } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; - } - - /** - * {@inheritDoc} - */ - public function hasScope(string $scopeName): bool - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'hasScope', [$scopeName]); - - return parent::hasScope($scopeName); - } - - /** - * {@inheritDoc} - */ - public function setName($name) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', [$name]); - - return parent::setName($name); - } - - /** - * {@inheritDoc} - */ - public function getName() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', []); - return parent::getName(); - } - - /** - * {@inheritDoc} - */ - public function setApiKey($apiKey) - { + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + "\0".parent::class."\0".'accessEvents' => [parent::class, 'accessEvents', null], + "\0".parent::class."\0".'adminEvents' => [parent::class, 'adminEvents', null], + "\0".parent::class."\0".'api_key' => [parent::class, 'api_key', null], + "\0".parent::class."\0".'created_at' => [parent::class, 'created_at', null], + "\0".parent::class."\0".'id' => [parent::class, 'id', null], + "\0".parent::class."\0".'is_active' => [parent::class, 'is_active', null], + "\0".parent::class."\0".'name' => [parent::class, 'name', null], + "\0".parent::class."\0".'scopes' => [parent::class, 'scopes', null], + "\0".parent::class."\0".'status_at' => [parent::class, 'status_at', null], + 'accessEvents' => [parent::class, 'accessEvents', null], + 'adminEvents' => [parent::class, 'adminEvents', null], + 'api_key' => [parent::class, 'api_key', null], + 'created_at' => [parent::class, 'created_at', null], + 'id' => [parent::class, 'id', null], + 'is_active' => [parent::class, 'is_active', null], + 'name' => [parent::class, 'name', null], + 'scopes' => [parent::class, 'scopes', null], + 'status_at' => [parent::class, 'status_at', null], + ]; - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setApiKey', [$apiKey]); - - return parent::setApiKey($apiKey); - } - - /** - * {@inheritDoc} - */ - public function getApiKey() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getApiKey', []); - - return parent::getApiKey(); - } - - /** - * {@inheritDoc} - */ - public function setIsActive($isActive) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIsActive', [$isActive]); - - return parent::setIsActive($isActive); - } - - /** - * {@inheritDoc} - */ - public function getIsActive() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIsActive', []); - - return parent::getIsActive(); - } - - /** - * {@inheritDoc} - */ - public function setCreatedAt($createdAt) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedAt', [$createdAt]); - - return parent::setCreatedAt($createdAt); - } - - /** - * {@inheritDoc} - */ - public function getCreatedAt() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', []); - - return parent::getCreatedAt(); - } - - /** - * {@inheritDoc} - */ - public function setStatusAt($statusAt) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setStatusAt', [$statusAt]); - - return parent::setStatusAt($statusAt); - } - - /** - * {@inheritDoc} - */ - public function getStatusAt() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getStatusAt', []); - - return parent::getStatusAt(); - } - - /** - * {@inheritDoc} - */ - public function getId() - { - if ($this->__isInitialized__ === false) { - return parent::getId(); - } - - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []); - - return parent::getId(); - } - - /** - * {@inheritDoc} - */ - public function addAccessEvent(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent $accessEvent) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAccessEvent', [$accessEvent]); - - return parent::addAccessEvent($accessEvent); - } - - /** - * {@inheritDoc} - */ - public function removeAccessEvent(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent $accessEvent) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAccessEvent', [$accessEvent]); - - return parent::removeAccessEvent($accessEvent); - } - - /** - * {@inheritDoc} - */ - public function getAccessEvents() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAccessEvents', []); - - return parent::getAccessEvents(); - } - - /** - * {@inheritDoc} - */ - public function addAdminEvent(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AdminEvent $adminEvent) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'addAdminEvent', [$adminEvent]); - - return parent::addAdminEvent($adminEvent); - } - - /** - * {@inheritDoc} - */ - public function removeAdminEvent(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AdminEvent $adminEvent) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeAdminEvent', [$adminEvent]); - - return parent::removeAdminEvent($adminEvent); - } - - /** - * {@inheritDoc} - */ - public function getAdminEvents() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAdminEvents', []); - - return parent::getAdminEvents(); - } - - /** - * {@inheritDoc} - */ - public function addScope(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\Scope $scope) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'addScope', [$scope]); - - return parent::addScope($scope); - } - - /** - * {@inheritDoc} - */ - public function removeScope(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\Scope $scope) + public function __isInitialized(): bool { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeScope', [$scope]); - - return parent::removeScope($scope); + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - */ - public function getScopes() + public function __serialize(): array { + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getScopes', []); - - return parent::getScopes(); + return $properties; } - } diff --git a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityScope.php b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityScope.php index d5147d0..32461e3 100644 --- a/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityScope.php +++ b/storage/proxies/__CG__ApiSkeletonsLaravelDoctrineApiKeyEntityScope.php @@ -2,271 +2,46 @@ namespace DoctrineProxies\__CG__\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class Scope extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\Scope implements \Doctrine\ORM\Proxy\Proxy +class Scope extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\Scope implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - - - - - - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'name', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'apiKeys']; - } - - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'name', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\Scope' . "\0" . 'apiKeys']; + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (Scope $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); - } - - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void - { - $this->__cloner__ = $cloner; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure - { - return $this->__cloner__; + $this->initializeLazyObject(); } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; - } - - /** - * {@inheritDoc} - */ - public function setName($name) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setName', [$name]); - return parent::setName($name); - } - - /** - * {@inheritDoc} - */ - public function getName() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', []); - - return parent::getName(); - } - - /** - * {@inheritDoc} - */ - public function setCreatedAt($createdAt) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedAt', [$createdAt]); - - return parent::setCreatedAt($createdAt); - } + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + "\0".parent::class."\0".'apiKeys' => [parent::class, 'apiKeys', null], + "\0".parent::class."\0".'created_at' => [parent::class, 'created_at', null], + "\0".parent::class."\0".'id' => [parent::class, 'id', null], + "\0".parent::class."\0".'name' => [parent::class, 'name', null], + 'apiKeys' => [parent::class, 'apiKeys', null], + 'created_at' => [parent::class, 'created_at', null], + 'id' => [parent::class, 'id', null], + 'name' => [parent::class, 'name', null], + ]; - /** - * {@inheritDoc} - */ - public function getCreatedAt() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', []); - - return parent::getCreatedAt(); - } - - /** - * {@inheritDoc} - */ - public function getId() - { - if ($this->__isInitialized__ === false) { - return (int) parent::getId(); - } - - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []); - - return parent::getId(); - } - - /** - * {@inheritDoc} - */ - public function addApiKey(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey $apiKey) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'addApiKey', [$apiKey]); - - return parent::addApiKey($apiKey); - } - - /** - * {@inheritDoc} - */ - public function removeApiKey(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey $apiKey) + public function __isInitialized(): bool { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeApiKey', [$apiKey]); - - return parent::removeApiKey($apiKey); + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - */ - public function getApiKeys() + public function __serialize(): array { + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getApiKeys', []); - - return parent::getApiKeys(); + return $properties; } - } diff --git a/storage/proxies/__CG__AppDoctrineORMEntityArtist.php b/storage/proxies/__CG__AppDoctrineORMEntityArtist.php index cd6dfb3..dcd6886 100644 --- a/storage/proxies/__CG__AppDoctrineORMEntityArtist.php +++ b/storage/proxies/__CG__AppDoctrineORMEntityArtist.php @@ -2,226 +2,41 @@ namespace DoctrineProxies\__CG__\App\Doctrine\ORM\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class Artist extends \App\Doctrine\ORM\Entity\Artist implements \Doctrine\ORM\Proxy\Proxy +class Artist extends \App\Doctrine\ORM\Entity\Artist implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( - 'name' => NULL, - 'performances' => NULL, -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - unset($this->name, $this->performances); - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - /** - * - * @param string $name - */ - public function __get($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); - return $this->$name; - } - - trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); - + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); - - $this->$name = $value; - - return; - } - - $this->$name = $value; - } - - /** - * - * @param string $name - * @return boolean - */ - public function __isset($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return isset($this->$name); - } - - return false; - } - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', 'name', 'id', 'performances']; - } - - return ['__isInitialized__', 'id']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (Artist $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - unset($this->name, $this->performances); - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); - } - - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; + $this->initializeLazyObject(); } + - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'id' => [parent::class, 'id', null], + 'name' => [parent::class, 'name', null], + 'performances' => [parent::class, 'performances', null], + ]; - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void + public function __isInitialized(): bool { - $this->__cloner__ = $cloner; + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure + public function __serialize(): array { - return $this->__cloner__; - } + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; + return $properties; } - - } diff --git a/storage/proxies/__CG__AppDoctrineORMEntityPerformance.php b/storage/proxies/__CG__AppDoctrineORMEntityPerformance.php index f1f7381..1c6dbfc 100644 --- a/storage/proxies/__CG__AppDoctrineORMEntityPerformance.php +++ b/storage/proxies/__CG__AppDoctrineORMEntityPerformance.php @@ -2,233 +2,45 @@ namespace DoctrineProxies\__CG__\App\Doctrine\ORM\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class Performance extends \App\Doctrine\ORM\Entity\Performance implements \Doctrine\ORM\Proxy\Proxy +class Performance extends \App\Doctrine\ORM\Entity\Performance implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( - 'venue' => NULL, - 'city' => NULL, - 'state' => NULL, - 'performanceDate' => NULL, - 'recordings' => NULL, - 'artist' => NULL, -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( - 'venue' => NULL, - 'city' => NULL, - 'state' => NULL, -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - unset($this->venue, $this->city, $this->state, $this->performanceDate, $this->recordings, $this->artist); - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - /** - * - * @param string $name - */ - public function __get($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); - return $this->$name; - } - - trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); - + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); - - $this->$name = $value; - - return; - } - - $this->$name = $value; - } - - /** - * - * @param string $name - * @return boolean - */ - public function __isset($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return isset($this->$name); - } - - return false; - } - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', 'venue', 'city', 'state', 'performanceDate', 'id', 'recordings', 'artist']; - } - - return ['__isInitialized__', 'id']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (Performance $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - unset($this->venue, $this->city, $this->state, $this->performanceDate, $this->recordings, $this->artist); - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); - } - - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; + $this->initializeLazyObject(); } + - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'artist' => [parent::class, 'artist', null], + 'city' => [parent::class, 'city', null], + 'id' => [parent::class, 'id', null], + 'performanceDate' => [parent::class, 'performanceDate', null], + 'recordings' => [parent::class, 'recordings', null], + 'state' => [parent::class, 'state', null], + 'venue' => [parent::class, 'venue', null], + ]; - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void + public function __isInitialized(): bool { - $this->__cloner__ = $cloner; + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure + public function __serialize(): array { - return $this->__cloner__; - } + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; + return $properties; } - - } diff --git a/storage/proxies/__CG__AppDoctrineORMEntityRecording.php b/storage/proxies/__CG__AppDoctrineORMEntityRecording.php index d905b42..dd335a1 100644 --- a/storage/proxies/__CG__AppDoctrineORMEntityRecording.php +++ b/storage/proxies/__CG__AppDoctrineORMEntityRecording.php @@ -2,227 +2,42 @@ namespace DoctrineProxies\__CG__\App\Doctrine\ORM\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class Recording extends \App\Doctrine\ORM\Entity\Recording implements \Doctrine\ORM\Proxy\Proxy +class Recording extends \App\Doctrine\ORM\Entity\Recording implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( - 'source' => NULL, - 'performance' => NULL, - 'users' => NULL, -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - unset($this->source, $this->performance, $this->users); - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - /** - * - * @param string $name - */ - public function __get($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); - return $this->$name; - } - - trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); - + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); - - $this->$name = $value; - - return; - } - - $this->$name = $value; - } - - /** - * - * @param string $name - * @return boolean - */ - public function __isset($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return isset($this->$name); - } - - return false; - } - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', 'source', 'id', 'performance', 'users']; - } - - return ['__isInitialized__', 'id']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (Recording $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - unset($this->source, $this->performance, $this->users); - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); - } - - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; + $this->initializeLazyObject(); } + - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'id' => [parent::class, 'id', null], + 'performance' => [parent::class, 'performance', null], + 'source' => [parent::class, 'source', null], + 'users' => [parent::class, 'users', null], + ]; - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void + public function __isInitialized(): bool { - $this->__cloner__ = $cloner; + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure + public function __serialize(): array { - return $this->__cloner__; - } + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; + return $properties; } - - } diff --git a/storage/proxies/__CG__AppDoctrineORMEntityUser.php b/storage/proxies/__CG__AppDoctrineORMEntityUser.php index c1cd915..09efcad 100644 --- a/storage/proxies/__CG__AppDoctrineORMEntityUser.php +++ b/storage/proxies/__CG__AppDoctrineORMEntityUser.php @@ -2,229 +2,44 @@ namespace DoctrineProxies\__CG__\App\Doctrine\ORM\Entity; - /** * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR */ -class User extends \App\Doctrine\ORM\Entity\User implements \Doctrine\ORM\Proxy\Proxy +class User extends \App\Doctrine\ORM\Entity\User implements \Doctrine\ORM\Proxy\InternalProxy { - /** - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with - * three parameters, being respectively the proxy object to be initialized, the method that triggered the - * initialization process and an array of ordered parameters that were passed to that method. - * - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer - */ - public $__initializer__; - - /** - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object - * - * @see \Doctrine\Common\Proxy\Proxy::__setCloner - */ - public $__cloner__; - - /** - * @var boolean flag indicating if this object was already initialized - * - * @see \Doctrine\Persistence\Proxy::__isInitialized - */ - public $__isInitialized__ = false; - - /** - * @var array properties to be lazy loaded, indexed by property name - */ - public static $lazyPropertiesNames = array ( - 'name' => NULL, - 'email' => NULL, - 'password' => NULL, - 'role' => NULL, - 'recordings' => NULL, -); - - /** - * @var array default values of properties to be lazy loaded, with keys being the property names - * - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties - */ - public static $lazyPropertiesDefaults = array ( -); - - - - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) - { - unset($this->name, $this->email, $this->password, $this->role, $this->recordings); - - $this->__initializer__ = $initializer; - $this->__cloner__ = $cloner; - } - - /** - * - * @param string $name - */ - public function __get($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__get', [$name]); - return $this->$name; - } - - trigger_error(sprintf('Undefined property: %s::$%s', __CLASS__, $name), E_USER_NOTICE); - + use \Symfony\Component\VarExporter\LazyGhostTrait { + initializeLazyObject as private; + setLazyObjectAsInitialized as public __setInitialized; + isLazyObjectInitialized as private; + createLazyGhost as private; + resetLazyObject as private; } - /** - * - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__set', [$name, $value]); - - $this->$name = $value; - - return; - } - - $this->$name = $value; - } - - /** - * - * @param string $name - * @return boolean - */ - public function __isset($name) - { - if (\array_key_exists($name, self::$lazyPropertiesNames)) { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__isset', [$name]); - - return isset($this->$name); - } - - return false; - } - - /** - * - * @return array - */ - public function __sleep() - { - if ($this->__isInitialized__) { - return ['__isInitialized__', 'name', 'email', 'password', 'role', 'id', 'recordings']; - } - - return ['__isInitialized__', 'id']; - } - - /** - * - */ - public function __wakeup() - { - if ( ! $this->__isInitialized__) { - $this->__initializer__ = function (User $proxy) { - $proxy->__setInitializer(null); - $proxy->__setCloner(null); - - $existingProperties = get_object_vars($proxy); - - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { - if ( ! array_key_exists($property, $existingProperties)) { - $proxy->$property = $defaultValue; - } - } - }; - - unset($this->name, $this->email, $this->password, $this->role, $this->recordings); - } - } - - /** - * - */ - public function __clone() - { - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); - } - - /** - * Forces initialization of the proxy - */ public function __load(): void { - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __isInitialized(): bool - { - return $this->__isInitialized__; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitialized($initialized): void - { - $this->__isInitialized__ = $initialized; - } - - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setInitializer(?\Closure $initializer = null): void - { - $this->__initializer__ = $initializer; + $this->initializeLazyObject(); } + - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __getInitializer(): ?\Closure - { - return $this->__initializer__; - } + private const LAZY_OBJECT_PROPERTY_SCOPES = [ + 'email' => [parent::class, 'email', null], + 'id' => [parent::class, 'id', null], + 'name' => [parent::class, 'name', null], + 'password' => [parent::class, 'password', null], + 'recordings' => [parent::class, 'recordings', null], + 'role' => [parent::class, 'role', null], + ]; - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - */ - public function __setCloner(?\Closure $cloner = null): void + public function __isInitialized(): bool { - $this->__cloner__ = $cloner; + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); } - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific cloning logic - */ - public function __getCloner(): ?\Closure + public function __serialize(): array { - return $this->__cloner__; - } + $properties = (array) $this; + unset($properties["\0" . self::class . "\0lazyObjectState"]); - /** - * {@inheritDoc} - * @internal generated method: use only when explicitly handling proxy specific loading logic - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API - * @static - */ - public function __getLazyProperties(): array - { - return self::$lazyPropertiesDefaults; + return $properties; } - - }