Skip to content

Commit

Permalink
Merge pull request #55 from TomHAnderson/feature/upgrade-doctrine-orm…
Browse files Browse the repository at this point in the history
…-graphql

Upgrade to laravel-doctrine-orm 3.0.0
  • Loading branch information
TomHAnderson authored Oct 23, 2024
2 parents f43af4d + 1380cc9 commit 1e851ed
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 2,365 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
434 changes: 62 additions & 372 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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<string, null> properties to be lazy loaded, indexed by property name
*/
public static $lazyPropertiesNames = array (
);

/**
* @var array<string, mixed> 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;
}

}
Loading

0 comments on commit 1e851ed

Please sign in to comment.