Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/devtool/src/Generator/ModelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ protected function getOptions(): array
['resource', 'r', InputOption::VALUE_NONE, 'Indicates if the generated controller should be a resource controller'],
['api', null, InputOption::VALUE_NONE, 'Indicates if the generated controller should be an API resource controller'],
['requests', 'R', InputOption::VALUE_NONE, 'Create new form request classes and use them in the resource controller'],
['path', 'p', InputOption::VALUE_OPTIONAL, 'The path of the model.'],
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/devtool/src/Generator/ResourceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ protected function getDefaultNamespace(): string

protected function getOptions(): array
{
return [
return array_merge(parent::getOptions(), [
['namespace', 'N', InputOption::VALUE_OPTIONAL, 'The namespace for class.', null],
['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the resource already exists'],
['collection', 'c', InputOption::VALUE_NONE, 'Create a resource collection'],
];
]);
}
}
7 changes: 1 addition & 6 deletions src/object-pool/src/Traits/HasPoolProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ trait HasPoolProxy
*/
protected function createPoolProxy(string $driver, Closure $resolver, array $config = [], ?string $proxyClass = null): mixed
{
if (! $proxyClass) {
// @phpstan-ignore function.alreadyNarrowedType (trait flexibility: using class may not define poolProxyClass)
$proxyClass = property_exists($this, 'poolProxyClass')
? $this->poolProxyClass
: PoolProxy::class;
}
$proxyClass ??= $this->poolProxyClass;

if (! is_a($proxyClass, PoolProxy::class, true)) {
throw new InvalidArgumentException('The pool proxy class must be an instance of ' . PoolProxy::class);
Expand Down