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

!!! TASK: Remove deprecated code #2262

Merged
merged 14 commits into from
Nov 30, 2020
Merged

Conversation

bwaidelich
Copy link
Member

@bwaidelich bwaidelich commented Nov 17, 2020

Remove obsolete and deprecated PHP code:

  • Cli/Request::getMainRequest() & Cli/Request::isMainRequest()
  • Neos\Flow\Persistence\Generic\*
    • Before we had doctrine, we had a custom persistence layer that was kept as "generic" persistence when we introduced doctrine ten years ago (via 90cb658). Since 6.0 this custom persistence was deprecated in favor of the corresponding Neos\Flow\Persistence\Doctrine\* classes.
      generic persistence is dead, long live generic persistence! (and thanks to @kdambekalns for spending million of minutes and brain cells on this)
  • Neos\Flow\Security\Cryptography\SaltedMd5HashingStrategy
    • md5 is unsafe and the hashing strategy was deprecated with 6.0.
  • ObjectAccess::instantiateClass()
  • HttpRequestHandlerInterface/HttpRequestHandler::getHttpResponse()

Related: #2172

@sorenmalling
Copy link
Contributor

Related draft PR #2181

@sorenmalling
Copy link
Contributor

sorenmalling commented Nov 17, 2020

Related draft PR #2181

Draft PR can be closed in favor of this - I don't mind :)

@bwaidelich
Copy link
Member Author

@sorenmalling I'm sorry, I wasn't aware of your pr. will check tomorrow!

@sorenmalling
Copy link
Contributor

I believe it's mostly the same :-)

@bwaidelich bwaidelich mentioned this pull request Nov 18, 2020
3 tasks
@bwaidelich bwaidelich marked this pull request as ready for review November 18, 2020 12:37
@bwaidelich bwaidelich closed this Nov 25, 2020
@bwaidelich bwaidelich reopened this Nov 25, 2020
@sorenmalling
Copy link
Contributor

How did the verdict on removal of Component code go?

@sorenmalling
Copy link
Contributor

Compared to https://github.com/neos/flow-development-collection/pull/2181/files I can see we do not remove ex. PsrSystemLoggerInterface?

Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

There is documentation that needs to be updated (on generic persistence, probably more…)

@kdambekalns kdambekalns changed the title !!! Remove deprecated code !!! TASK: Remove deprecated code Nov 27, 2020
@bwaidelich
Copy link
Member Author

How did the verdict on removal of Component code go?

How do you mean? That was removed with #2019 (and we still have to smoothen the bumps with #2258)

Compared to #2181 I can see we do not remove ex. PsrSystemLoggerInterface?

Good point, I missed that one when I compared the two (#2181 (comment)).

There is documentation that needs to be updated (on generic persistence, probably more…)

True that..

@sorenmalling @kdambekalns Thanks for your feedback, I'll prepare a follow-up

@sorenmalling
Copy link
Contributor

How do you mean? That was removed with #2019 (and we still have to smoothen the bumps with #2258)

Roger that - got lost in back/forth on keeping or not 👍

Removes `HttpRequestHandlerInterface::getHttpResponse()` and adjusts
the method in the `RequestHandler` implementation such that it throws
an exception when called in order to make it easier for developers
to adjust their code.
@bwaidelich
Copy link
Member Author

Update: The Psr Logger interfaces have been removed with #2134, that's why they don't appear in the diff :)

@bwaidelich
Copy link
Member Author

Looking at the documentation I found a lot of outdated examples and code.
I tried to address those with a separate issue (see #2280)

There is documentation that needs to be updated (on generic persistence, probably more…)

It seems like (apart from the CGL tweaks mentioned above) it's only the generic persistence part that is affected.
I'm a bit puzzled currently. @kdambekalns do you think it would be enough to just remove the part from the docs: https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/Persistence.html#generic-persistence
?

@bwaidelich
Copy link
Member Author

@kdambekalns could you remove your -1 if you agree with the current version?

Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

Looks good now…

@albe
Copy link
Member

albe commented Nov 27, 2020

D'oh, that was nop StyleCI PR :D

@albe
Copy link
Member

albe commented Nov 29, 2020

We could also strip out the old autoloader instead of #2288, but TBH I never set the FLOW_ONLY_COMPOSER_LOADER=true env var to check if nothing breaks and I guess most didn't. Keeping the flag will at least provide an escape-hatch for another major version in case it causes problems.

@bwaidelich bwaidelich merged commit af7b337 into master Nov 30, 2020
@bwaidelich bwaidelich deleted the task/remove-deprecated-code branch November 30, 2020 08:47
@bwaidelich
Copy link
Member Author

We could also strip out the old autoloader

I prefer the way you went with #2288 now since it leave us with the mentioned escape hatch, thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants