Soooo... just pulling in a convo from the ML (@TheodoreBrown) but what do you recon the chances are of us holding a full vote to deprecate # comments before PHP 8.0 if / when #[ ... ] wins?
This would clearly need the approval of our benevolent oveRMlords
@MarkR it doesn't actually make any odds to when we remove something whether it's deprecated in 8.0 or 8.1, because either way it can be removed in 9.0 and no earler
there's some logic in tying the two things together, but not really worth rushing yet another vote for IMO
With everything that's happened regarding attributes so far, and with #[ looking to win out by a large margin, I wouldn't bet my house on not throwing out the usual rule book for #
@MarkR I was actually thinking about introducing some preprocessor stuff like #if PHP_VERSION > 8.1. That would make # as comments usable in even less cases and thus it would probably make sense to remove them completely. Anyway, the ship for 8.0 has sailed.
This does give me an idea though for prepared statement emulation for pdo_mysql... introduce it as a deprecation (if I can provide a convincing enough argument) in 8.1, then change the default to off in 9
Deprecation is probably not the word I'm looking for...
@MarkR I don't think deprecation could realistically happen in 8.0. But if #[] does win, it seems like hash comments should be deprecated at some point to avoid long-term confusion.
something needs to be done about the process IMHO we had 2 fuck-ups in the span of 18months and both dragged stuff out for 4 month which leads to fatigue
Depends how it goes once it gets into the wild really. Personally if PHP were a commercial project I managed, and I added something like #[ into it, # wouldn't even survive into the major release.
It's PHP, the people who will upgrade will run a script over their source and have their upgrade done in 10 seconds, those who aren't going to upgrade aren't going to do so until they're forced to 5 to 10 years later.
I don't know how hard it will be to go from 7.x to 8.x but at least we're not getting rid of a DB extension which a bazillion people used to handle DB queries
@IMSoP I expect eventually Nikita will follow-through on his idea of a PHP-official migration script, and I suspect that it would probably end up as a default composer post pull hook shortly thereafter
I trust their maintainers not to tag them while their unit tests are failing
if you have a hook that changes other people's code when you install it, you can no longer make any assumptions about it working as advertised; you've basically got an untested fork
@MarkR I interviewed for a place that was upgrading their codebase for 7.4 from 7.3 manually. They don't use a framework, they use very few composer libraries.
the other problem is that an automated upgrade tool would only be useful for the breaking changes that we don't really need to make anyway; if a # comment is unambiguously a comment, we can just carry on treating it as a comment
wiki.php.net/rfc/platform_requirement_declares This was something I was working on 6 months ago but Nikita suggested I shelf it in favour of editions (which IMHO would have made Attributes a whole lot easier)
@Girgias absolutely; an official manual tool for that would be great
but I'm still not going to run it over my vendor folder, because I don't know that base version for every package, and I don't want to maintain the resulting forks
@MarkR that's mostly useful for minimum versions; maximum versions are trickier, because you don't want to have to keep changing them all the time; but it's maximum version we need in this case