« first day (3891 days earlier)      last day (1048 days later) » 
07:00 - 23:0023:00 - 00:00

11:00 PM
yes, that's why i suggested a separate RFC for that ( support in PDO, mysql, exec .. etc ).
 
Yep, it's the telling PHP that this thing is safe which will open up a whole new round of discussions, which should be done later (I'm also struggling enough to get the basic idea across).
@SaifEddinGmati Perfect :-)
 
@CraigFrancis it's telling what is perhaps safe, so potentially safer. likewise userspace libraries can benefit of it right on 8.1 or what the schedule is, as a language feature (not a function), you want to have it similarily early (if acceptance shows) for internal libraries.
declare(...) is just an incident suggestion, I find the way this was done for strict_types pretty handy.
 
@CraigFrancis forgive me for what i have done: 3v4l.org/8Z2GW/rfc#rfc.literals
 
it also is about how strings behave (e.g. $_GET['id'] -> some_funct(int $id) - acceptable or not).
 
@hakre declare(strict_types=1) was a mistake too
 
11:05 PM
@hakre I'm always cautious of the word "safe" (as noted under the Naming section), is_literal() just says that it's written by the programmer, so you can trust it... and this is intended for userspace libraries for 8.1... the rest will be a future version, hopefully some warnings coming from native functions in 8.2 (we need the libraries to get a head start).
 
@SaifEddinGmati was it? please share more
@CraigFrancis wasn't the introduction talking about that you can't trust the programmer in the first place because too dumb to handle encoding?
:)
 
@SaifEddinGmati It's not my website, so I'm not sure... can you copy your PHP code and start again with this link: 3v4l.org/#focus=rfc.literals
 
@CraigFrancis same result, but i can't share code when running in a single branch like that, i need to run against all branches and share code from branch tab.
 
@hakre :-P ... the library can trust that it does not contain user values :-)
ohh, I see, you wanted me to look at the output... I've noted that as well, it might be fine (Joe Watkins knows how all this stuff works, I tried many times, and just got a headache).
oh, wait a minute... I think that's working as expected... you do weird stuff with pack and unpack (and the wonderers of whatever goes on in there), then I think it should drop the flag.
 
because at the moment it was introduced, declaring strict types by default wouldn't have been a BC break, now we are stuck with it, internal functions are not strict ( https://twitter.com/Ocramius/status/1394931673586876416 ). PHP type juggling is bad ( see https://github.com/vimeo/psalm/issues/5896 ), it's unpredictable and can ( and did more than once for me ) cause bugs.

overall, it's bad.
 
11:20 PM
> wouldn't have been a BC break
serious? anything from web comes in as string and has always be used non strict for each type ... how wouldn't that be a massive bc break?
the remark on internal functions is a valid remark, but mind the pov from ocramius.
 
no, types weren't a thing before PHP 7, there was not function typed to accept a string
i initially told marco about it, but can't find the github discussion
 
it was just the foundation, right. but that's nothing because it was not declared as a trype, right ... err.
 
@hakre so actually, moving code from 5.x to 7.x woud work as is, if strict types were enabled by default.
 
I've got to go in a minute, but for my own sanity, it sounded like you're both happy with the basic implementation of is_literal(), and the RFC is about right? (admittedly I'd like it to be shorter, but I think all of the questions need covering).
 
@SaifEddinGmati that is you who bc break w/ PHP in PSL so that it's bleeding when running composer update on rbc ... well how wonderful.
@SaifEddinGmati well, trust the terrain, not the map.
honestly, I highly doubt that.
 
11:27 PM
@CraigFrancis yes :)
 
@SaifEddinGmati Thank you (I really appreciate that)
 
@hakre rbc?
 
@SaifEddinGmati roave backwardcompat checker
composer wants to go to version 2 but somehow we can't have nice things.
 
@hakre change/updating your dependency and internal implementation is not a BC break, the public API for BC checker is the command line, so no BC breaks were introduced there.
( going by semver, unless you are following something else )
 
@SaifEddinGmati wrong end, when upgrading rbc PSL tells composer it would require 8 and rbc tells it needs 7 and therefore refuses to upgrade (albeit regardless what PSL tells, it runs fine on 7).
 
11:31 PM
it doesn't run fine on PHP 7, and i'm sure.
 
root package is rbc here. no idea how PSL then is semver. maybe not on the PHP version it requires.
 
PSL 1.8 requires PHP 8, PSL 1.7 works fine in 7.4 and 8.0
 
well for a userspace library how could that be.
 
composer.json :)
sorry, 1.6 works with 7.4|8.0, 1.7 needs 8.0, see github.com/azjezz/psl/tree/1.7.x vs github.com/azjezz/psl/tree/1.6.x
 
yes, and well, we have no idea for what P stands for in PSL, this perhaps should have gone from 1.7 to 2.0, not 1.8.
 
11:33 PM
if 1.7 worked with php 7.4, i wouldn't have dumped PHP version
 
or from 1.6 to 2.0 then.
 
@hakre no, upgrading my own dependency is no a BC break
composer will never install 1.7 for you if you have PHP 7.4
 
k, g'night everyone :-)
 
unless you tell to ignore PHP version, which you shouldn't :)
 
@SaifEddinGmati yes, as said, we have no clue what P stands for in PSL.
 
11:35 PM
@CraigFrancis night
 
@CraigFrancis gn8
 
maybe you should name it PEL - PHP Experimental Library then.
just exchanging ideas ;)
 
cmb
@Dharman It doesn't look like the manual says dl() is deprectated; while the function has been reomved from many APIs and is not available in ZTS builds, it should still be good for NTS CLI.
 
or go with semver which has the problem that you need to raise major versions too often - but that's just what semver is.
take the luxury being 0.x or go rocket sky.
 
11:39 PM
Ok, then. I think it could have been worded differently in the manual. It looks like the whole function is deprecated.
 
@SaifEddinGmati sure it does, just ignore platform reqs. and with -w for rbc root package.
this is where you can run it that way with 7.4 and have rbc the work done for dev-master with composer 2.
 
@hakre you are ignore what a package require, it's never safe do that :)
how does PSL 1.7 work with PHP 7.4??
Psl 1.7 uses namespaces that are not allowed in PHP 7.4 3v4l.org/Z6VJH
 
@SaifEddinGmati the actual syntax error is a different one in that scenario, but executing rbc then with php 8 does it.
but as written earlier, wrong end.
 
i don't really understand what you are saying
 
when you provide a library and you break backwards compat, you have to raise the major version, right?
(given above 0.x)
 
11:48 PM
yes, but i didn't break BC
you are arguing that changing dependencies is a BC break, it's not.
 
technically not, you just changed the runtime version needed.
in a backwards incompatible way.
 
cmb
@Dharman likely, yes :) it also might be helpful to downgrade that warning to a tip or note, or actually to drop it, since the manual shouldn't cover pre PHP 7 stuff anymore
 
it's certainly arguable if that constitutes a bc break or not.
 
it's not, i'm following semver.

https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api
 
@SaifEddinGmati hmm, syntax not part of the public api in a dynamic language. well again, it's certainly arguable. you can insist that it's not, you get your base covered, but this won't help users of your library for which you're using semver in the first place (maybe).
I'm the last person even that tells you you have to use semver even if you announce it.
 
11:53 PM
@hakre PSL doesn't have language features, it's a library that follows semver, if a library updates its dependencies, it's not a BC break. and PHP is a dependency of PSL.
 
@SaifEddinGmati unfortunately this is not a PHP extension to compile then maybe...
 
even extensions are allowed to do this if they are following semver, PHP is still a dependency regardless of the language used to write the library or how it works.
 
or is it as well? like dual mode, would be cool.
@SaifEddinGmati yes, they just wouldn't install then. but unlike with composer, there would be only one runtime so it's just not that much of a burden.
 
cmb
@SaifEddinGmati still, requiring a higher PHP version can break client code – sometimes badly
 
btw. no burden I wasn't able to resolve, that was just to give an impression of the impression it creates. maybe consider to have some version number policy to ease that (and why not compatible with semver) that could help users. not saying you did anything wrong by the book of semver.
 
11:59 PM
@cmb yea, extensions are a bit different due to the lack of a dependency manager that will tell you it's not possible, hopefully github.com/FriendsOfPHP/pickle fixes this ( one day )
 
07:00 - 23:0023:00 - 00:00

« first day (3891 days earlier)      last day (1048 days later) »