Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Make compatible with psr/log:^3 #769

Closed
wants to merge 1 commit into from

Conversation

koehnlein
Copy link
Contributor

@koehnlein koehnlein commented May 24, 2023

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added (for bug fixes / features)

Unfortunately, no tests have been added yet. And I'm a bit unsure about the best way to test it. I found out that all tests are run with a predefined composer.lock file and I don't know if that is intentional or not. I started another PR for it: #768

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Limit package "psr/log" to "^1.0 || ^2.0"

  • What is the current behavior? (You can also link to an open issue here)

In dad4d15, the package "monolog/monolog" was upgraded and the new version of "monolog/monolog" requires "psr/log":"^1.0 || ^2.0 || ^3.0" - But Surf ist not compatible with psr/log:^3

PHP Fatal error: Declaration of TYPO3\Surf\Domain\Service\ShellCommandService::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void in /tmp/vendor/typo3/surf/src/Integration/LoggerAwareTrait.php on line 20

See also #760

  • What is the new behavior (if this is a feature change)?

The new behavior is to only install psr/log in version 1 or 2

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No, it doesn't.

  • Other information:

I also tried to make Surf compatible with psr/log:^3 but I would have needed to change https://github.com/TYPO3/Surf/blob/master/src/Domain/Model/Deployment.php#LL288C29-L288C29 from

    public function setLogger(LoggerInterface $logger): self
    {
        $this->logger = $logger;

        return $this;
    }

to

    public function setLogger(LoggerInterface $logger): void
    {
        $this->logger = $logger;
    }

Which would have been a breaking change.

@sabbelasichon
Copy link
Collaborator

@koehnlein Thanks for your investigation. I have created a separated complete PR #770 based on your changes. I think we should give it a try.

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.

2 participants