slimphp / slimphp/Slim

More info on v5 changes

Open
#3,427 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
12.3k
Forks
2k
Avg merge
3d 2h
Merged PRs (30d)
6

Description

I work with Moodle and we've been migrating out legacy app to use Slim over the past 2 years.

I've just been looking through the 5.x branch to see how much the changes there are going to impact us but I'm finding that there isn't much information. The git commits aren't much help either because most of the commits contain seemingly unrelated changes under the banner 'Add v5'.

In particular:

  • the changelog notes about using middleware for custom route arguments with the removal of Route::setArguments, but I can't actually see how you would do this without the Route. We use Route::setArguments() within a validation middleware to remove undeclared parameters.
  • the \Slim\Interfaces\RouteInterface is just gone. No discussion, no alternative, no mention in the changelog. This is something that we use as type hints within our application and there is no apparent alternative or replacement
  • no backwards compatibility available and no deprecation for many of these things (like Route::setArguments and fetching the Route from the Request attributes). We're an open source project and while we will be able to fix many of these things in our core platform, our community plugins are going to struggle a lot more to support a wide range of versions

Is there a plan or any discussion for the v5 changes? I'm aware of https://github.com/slimphp/Slim/wiki/Slim-5-Road-Map but none of these breaking changes are mentioned there, and there is no discussion about these. I haven't (yet) found a discussion in the discource channel either.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Slim 5 Road Map and the 5.x branch, then review the changes involving Route::setArguments, RouteInterface, and fetching the Route from Request attributes. Done would mean documenting the planned breaking changes, migration or replacement paths, and backwards-compatibility or deprecation decisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.