Comments (11)
Hey, I've pushed a bunch of Symfony 6 fixes to dev-master, please give it a try and let me know if it works for you.
Unfortunately, it's impossible to release these in 5.1.x, as they break compatibility with older Symfony versions running on older PHP.
from clockwork.
At the least this should be mentioned in composer's conflicts section to avoid installing clockwork on an usupported version of Symfony.
from clockwork.
Symfony 6 compatibility was reversed, 51eae8d
from clockwork.
Thank you @erikn69 that's useful to know.
from clockwork.
There are also PHP 8.2 deprecations ,
Dynamic propertiy `container`
User Deprecated: Since symfony/framework-bundle 5.4:
Accessing the "profiler" service directly from the container is deprecated, use dependency injection instead.
from clockwork.
Thank you, I'll take it for a spin!
from clockwork.
@itsgoingd hi, what about two Symfony/ClockworkBundle.php files, one for V6 support, like
// Symfony/ClockworkBundleV6.php
class ClockworkBundleV6 extends Bundle
{
protected function getContainerExtensionClass(): string
{
return ClockworkExtension::class;
}
}
from clockwork.
@PaolaRuby That's definitively possible, I'm just not fan of that naming convention and I'm working on a next major version of Clockwork anyway. Since major versions can break backwards-compatibility, we can replace the main Symfony bundle with the updated one and either provide another legacy one or tell people using older Symfony to use older Clockwork version.
from clockwork.
Old-ish issue, but I thought I'd chime in anyway.
Instead of two files, I've seen devs, that wanted to support older applications just do a PHP version conditional in the class file and implement the whole class within that conditional.
In this case, it could look something like this:
if (true === version_compare(PHP_VERSION, '7.0.0', '<')) {
class ClockworkBundle extends Bundle
{
protected function getContainerExtensionClass()
{
return ClockworkExtension::class;
}
}
} else {
class ClockworkBundle extends Bundle
{
protected function getContainerExtensionClass(): string
{
return ClockworkExtension::class;
}
}
}
Ugly? Maybe, but it's a solution.
from clockwork.
This would be a valid option if the Symfony versions differed only in apis, but won't work when one of the versions uses new PHP syntax features. The older PHP parser needs to parse both branches and throws an error once it encounters the new return type syntax.
from clockwork.
Well, the symfony kernel provides its current version, so the above conditional could be changed to something like this
if (true === version_compare(\Symfony\Component\HttpKernel\Kernel::VERSION, '6.0.0', '<')) {
and you'd be good to go for whichever version of symfony the end-project uses.
Granted, this is just one class, relatively small and easy to maintain. I'm not familiar with symfony or clockwork enough to say how many classes would need a workaround like this or how much more headache it would add to your life.
from clockwork.
Related Issues (20)
- Unable to Expand Array/Object with Key Starting with Numeric HOT 2
- Clockwork HOT 1
- commandExecuted - no output in extension HOT 6
- Redis::pipeline calls not being instrumented HOT 3
- Profiler Tab stuck on "Loading profile" HOT 6
- Profiler support when using Slim 4 HOT 1
- Typo in `Request::addModelAction()` HOT 2
- Argument 6 passed to Symfony\Component\HttpFoundation\Cookie::__construct() must be of the type boolean, null given, called in vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkSupport.php on line 438 HOT 6
- Using MonologDataSource trigger error HOT 2
- Store method doesn't work (returns 404) HOT 2
- Compatibility with Doctrine DBAL 3 HOT 1
- (Laravel) Chrome extension has option to "Load more", but the web page doesn't? HOT 1
- Show listeners in events data source HOT 1
- Changed default behavior HOT 3
- Slack Message Notification tries to access protected property HOT 5
- Serialization Failure in Clockwork Due to Incomplete Object Representations HOT 5
- Bug: Exception when Notification class missing toArray() method HOT 2
- Symfony 7 Compatibility issues HOT 3
- Where is the response in this? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clockwork.