Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@codingioanniskrikos
Copy link
Contributor

@codingioanniskrikos codingioanniskrikos commented Feb 19, 2025

Using Sylius 2.0 with PHP 8.4 some deprecation notices are displayed:

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\FilesystemInterface::touch(): Implicitly marking parameter $time as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/FilesystemInterface.php on line 58

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\FilesystemInterface::touch(): Implicitly marking parameter $atime as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/FilesystemInterface.php on line 58

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\FilesystemInterface::mirror(): Implicitly marking parameter $iterator as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/FilesystemInterface.php on line 123

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\Filesystem::touch(): Implicitly marking parameter $time as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/Filesystem.php on line 47

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\Filesystem::touch(): Implicitly marking parameter $atime as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/Filesystem.php on line 47

Deprecated: Sylius\Bundle\ThemeBundle\Filesystem\Filesystem::mirror(): Implicitly marking parameter $iterator as nullable is deprecated, the explicit nullable type must be used instead in vendor/sylius/theme-bundle/src/Filesystem/Filesystem.php on line 82

@Prometee Prometee requested review from a team and GSadee February 19, 2025 15:14
* @throws IOException When file type is unknown
*/
public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = []);
public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP 8.4 deprecates implicitly nullable types.
It is also worth adding this change to the implementing class.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, also found another one.

@Prometee
Copy link
Contributor

I updated the PR description with the deprecated I always have running Sylius 2.0.
This PR is covering all of them so it's ready to be merged but I think it's a BC and I don't know yet how to proceed with it.

@GSadee can you help here?

@GSadee
Copy link
Member

GSadee commented Mar 11, 2025

I updated the PR description with the deprecated I always have running Sylius 2.0. This PR is covering all of them so it's ready to be merged but I think it's a BC and I don't know yet how to proceed with it.

@GSadee can you help here?

In my opinion, this change is not a BC break, as even if this changes the signature of the method, it only extends the scope of the type. So I'm ok with this change and implementing it to this branch 👌🏻

@GSadee GSadee merged commit cbea578 into Sylius:2.4 Mar 11, 2025
1 check passed
@dpfaffenbauer dpfaffenbauer deleted the patch-1 branch March 11, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants