Skip to content

Commit c650a31

Browse files
authored
Merge pull request #137 from cheack/8.4-deprecations
Fixed PHP 8.4 deprecation warnings
2 parents 6edf93a + 42bd484 commit c650a31

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Configuration/ConfigurationFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ public function __construct(ConfigRepository $config)
2727
* @param string|null $name The EntityManager name
2828
* @return array<string, mixed> The configuration (see config/migrations.php)
2929
*/
30-
public function getConfig(string $name = null): array
30+
public function getConfig(?string $name = null): array
3131
{
3232
if ($name && $this->config->has('migrations.' . $name)) {
3333
return $this->config->get('migrations.' . $name, []);
3434
}
3535
return $this->config->get('migrations.default', []);
3636
}
3737

38-
public function getConfigAsRepository(string $name = null): Repository
38+
public function getConfigAsRepository(?string $name = null): Repository
3939
{
4040
return new Repository($this->getConfig($name));
4141
}
4242

43-
public function make(string $name = null): ConfigurationArray
43+
public function make(?string $name = null): ConfigurationArray
4444
{
4545
$config = $this->getConfigAsRepository($name);
4646

src/Configuration/DependencyFactoryProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct(
2626
*
2727
* @return DependencyFactory
2828
*/
29-
public function fromEntityManagerName(string $name = null): DependencyFactory
29+
public function fromEntityManagerName(?string $name = null): DependencyFactory
3030
{
3131
$configuration = $this->factory->make($name);
3232
return DependencyFactory::fromEntityManager(

src/Schema/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function getColumnListing(string $table): array
167167
*
168168
* @return Table
169169
*/
170-
protected function build($table, Closure $callback = null): Table
170+
protected function build($table, ?Closure $callback = null): Table
171171
{
172172
return new Table($table, $callback);
173173
}

src/Schema/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Table
2121
* @param Blueprint $table
2222
* @param Closure|null $callback
2323
*/
24-
public function __construct(Blueprint $table, Closure $callback = null)
24+
public function __construct(Blueprint $table, ?Closure $callback = null)
2525
{
2626
$this->table = $table;
2727

0 commit comments

Comments
 (0)