« first day (3792 days earlier)      last day (1381 days later) » 

00:01
I'll be back tomorrow, but since the test itself does not really need the phpunit version upgrade I opened github.com/rdlowrey/auryn/pull/191
 
4 hours later…
03:44
@NikiC Are there hooks that are always on for whenever an object is allocated? I looked around but the only obvious place was ZEND_MM_CUSTOM, which as far as I can tell usually is on, but I cannot change this regardless.
Even if it on, it's unclear how I should properly intercept things for tracking. For instance, if I wanted to run some callback every X allocations.
 
2 hours later…
05:59
Dear Team,

I'm new to the magento. I want to remove the category or tag URL from the product URL. Website was build by some other person.

Magento Version - Magento ver. 2.3.5-p1

Original URL https://example.com/wine/color-red.html
New URL should be https://example.com/wine/color-red.html

Anyone one have an idea to solve this?

Thanking you,

Best Regards
Boopathi Rajan
06:47
@BoopathiRajan Have you checked this page?
Good morning.
07:10
@Tpojka

Good Morning!

Yes i have tried this option. its not working
07:31
"It's not working" is not helpful nor descriptive. You can try make an SO question with included all details what you have tried and what is exact output/error of those tryings.
Check [here](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) how to make a question with great chance to get an answer.
 
1 hour later…
08:35
@LeviMorrison MM_CUSTOM is the way
And you can assume that it's always available really
I think dmitry just has those defines in there for testing overhead
09:19
@NikiC Almost. Reflection isn't quite up to date with the RFC which I want to do tonight, apart from that it should be ready.
Add support for AVIF and HEIF ・ GD related ・ #80828
 
3 hours later…
12:02
@NikiC I am seeing some new segfaults in opcache when Xdebug and opcache are loaded together. I'll email you and Dmitry in a moment, but the failure is:

zend_persist.c:327: zend_access_get_type_map_ptr: Assertion: `ret > 2' failed.
 
1 hour later…
13:10
Morning
Morn'
I'm really enjoying @Derick's podcast. Really useful to keep up to date with the developments of PHP, but I only just found out about it.
13:49
It is quite handy :D
Andyjxa ・ *General Issues ・ #80829
14:05
It's a good show.
14:28
Running out of local ports when using curl ・ Network related ・ #80830
 
2 hours later…
cmb
cmb
16:10
@Derick, the release announcement for 7.4.16 is missing :)
IntlDateFormatter considers January 2021 days to be January 2020 days ・ Date/time related ・ #80831
@IluTov How goes the enum cleanup?
 
2 hours later…
17:55
@cmb Been busy, but will email it and sort that out
cmb
cmb
ta
18:45
@FélixGagnon-Grenier Already did that locally, yes.
19:01
Oh snap. It's Thursday.
@Derick Rude.
github.com/php/web-php/commit/… You rolled the distributions submodule back and took my tarballs out of web. :p
@kelunik Cool. if there's anything I can do when this moves, maybe try and fit @cmb's snippet to make the test pass or I don't know, please do advice when it would be appropriate.
19:25
@Jeeves the bug tracker could really do with a separate canned message for "not a bug, and I am going to tell you why"
19:38
@Crell My motivation has been pretty low lately, but I've finished most things over the last few days. Refection is the only thing missing (renaming a few methods, separating the case classes).
Wes
Wes
19:56
how do i say redundant but with a positive connotation? adjuvant, ancillary, supportive, supplementary, auxiliary "the second battery is _______ to the main battery"
auxiliary sounds less weird than the others, probably
the second battery is a backup
Wes
Wes
lol
better sentence (although it doesn't make sense) "both the batteries are _______ to each other"
friendly
Sorry :P
Wes
Wes
found it.... subsidiary . sounds good?
cooperative, supplemental
@Sara What is rude?
20:13
@Wes Maybe "the second battery could be removed without complications"?
Redundancy is not inherently a bad connotation -- it depends what context it is in.
When talking about jobs it's usually bad, but when talking about resilient systems it can be good.
@FélixGagnon-Grenier github.com/amphp/injector pushed the new package.
@Wes ludwig.guru/s/are+complementary+to+each+other - maybe. Or just the seocnd battery complements the first battery.
Wes
Wes
hmmm..... maybe i'll stick to redundant then
the web says it means "superfluous" so it kinda sounds like a bad thing
20:31
You could also say "the second battery works alongside/in tandem with the main battery".
@FélixGagnon-Grenier @cmb fixed and released
Wes
Wes
@Danack oh yeah that's good too
I've had "php fiber" as a saved search in tweet deck to watch for tweets related to the RFC, but I've gotten some weird results. This one wins though.
Wes
Wes
thanks
@Trowski lol
20:33
In systems resiliency, redundant components can be removed if needed (maintenance, etc) and the system will be unaffected in normal conditions. They can also help to handle unexpected or bursty loads.
@kelunik @cmb nice
le very thanks
Is there a way I can force a piece of code to be JIT'd? I'd like to test compatibility with Fibers, but how do I know code is using the JIT?
@Crell Lol, wiki.php.net/rfc/enumerations "This is an entirely legal Enum definition.", "public method offsetGet" :D
Looks like we'll have to introduce the method keyword now as the RFC was accepted :P
@Trowski Using --repeat 2 is a good way to test JIT interaction
@NikiC All done! I've kept all the commits since your last review so hopefully it's easier for you to see what changed.
20:48
@NikiC You're talking about PHPUnit, yes? How about with a phpt tests using run-tests.php?
@Trowski It's a run-tests option
@cmb @FélixGagnon-Grenier @Danack Please open feature requests for auryn on github.com/amphp/injector if you have any.
@NikiC I was still building against 8.0, I see it's only in master. :-P
We mere mortals tend to work with release versions.
If a function is repeatedly called in a loop, would that not reliably trigger the JIT?
21:09
@IluTov LOL. Oops? :-) Is it bad form to go back and fix a bug in the RFC at this point?
@Trowski yeah that should also work
The repeat option (in conjunction with the low jit thresholds that run-tests automatically sets) is just a convenient way to make most tests jited
@NikiC I'm looking at how this can be reliably done if it lands in php-src. I probably don't want to rely on the repeat option there.
21:25
Ah, you clarified in your second message, ignore :P
@NikiC I'm on PHP 8.0. What does an execute_data without a func mean?
@Danack @LeviMorrison Have you ever used Auryn\Injector::buildExecutable?
It's been too many years since I used Auryn to be able to answer basically any questions about it :)
@Crell i dEManD a rEvOTe
Should be no problem :P
@LeviMorrison Totally fine, just figured I'd ask, because I saw your name in the composer.json ;-)
21:36
@IluTov Updated.
@kelunik if you're asking "can it be discarded?", then the answer is probably yes. I think it was added to wrap different callable types in something that behaved consistently. And the need for that code to be written, was a small thing that lead to Closure::fromCallable() being RFC'd.
@Danack Yes, I think PHP has enough internal tools as alternative now. Discarded or made internal, one of both.
Though, also maybe it would be worth doing a final release in the current repo that tells people about auryn current version not working on PHP 8, and maybe giving a deprecation notice for that.
It's working on PHP 8.
We'll mark the package as deprecated once there's a release in the new repository.
21:54
@Danack Okay so hi, I have <small amount of time> now. Uh. My question is: are you sure the compiler is the right place? I think the zval for the string might be created as early as the lexer?
@Andrea I have no idea whatsoever if it's the right place.
@LeviMorrison @NikiC This is in composer update. It's making a new Composer\IO\NullIO object, and it doesn't have a constructor. I thought we used a fake function still? Or was this removed in 8.0?
Hmm actually, I guess interning must happen later, at least for some strings…
@LeviMorrison Dummy frame from zend_call_function I think?
@NikiC Looks like it: heap.space/xref/PHP-8.0/Zend/zend_vm_def.h?r=6dd85f83#5682. How do I identify the frame though? It doesn't set the func on the execute_data to &zend_pass_function.
22:01
@LeviMorrison I mean this one: github.com/php/php-src/blob/…
Hmm. I wish there was a comment here explaining what on earth it's doing: heap.space/xref/PHP-8.0/Zend/….
I can't claim to understand why the backtrace generation code does what it does...
opline = 0x0000000000000000
call = 0x0000000000000000
return_value = 0x0000000000000000
func = 0x0000000000000000
headache = 0x0000000000000001 ?
Ah I see, string interning for literals must happen in zend_compile.c… hmm
@Danack So… your code works some of the time, but not all of the time?
22:12
@IMSoP gonna read that blog post and come back to you on the list, but hadn't thought of that use case
@Andrea let me push and remind myself also...
@NikiC What is the frame actually used for in this case?
@LeviMorrison as it says, include/require
@NikiC Don't those use func though? Or just eval?
@Andrea I need to double-check, but think it was working for single-char strings...but not other ones.
$string = "q";
$string_is_literal = is_literal($string); // true

$string = "what is going on.";
$string_is_literal = is_literal($string); // false
at which point I got a really bad headache.
22:19
@Danack aha. by sheer luck I may already know what it is, then
single-char strings are immediately interned by the lexer
but longer ones get created as non-interned strings and then get interned… somewhere
probably the interning nukes your flag
actually there's some code that literally sets all the flags to zero. not sure which flags but might be the ones you're after
@Danack You might want to look at zval_make_interned_string and zend_insert_literal in zend_compile.c if you haven't yet. I have a feeling they are responsible for the problem.
This is just a guess from quick ctrl-F'ing a few minutes ago though :p
@Andrea cool, I'll look there.
@Girgias For your docs tracker collection: github.com/php/doc-en/pull/476
@Crell Added :D
22:35
@Danack Not having followed any of the discussion: is_literal is about safety, right? Could is_tainted be a better name? It would be nice if methods like htmlentities would "untaint" the value for usage in HTML but that would require tracking different kinds of vulnerabilities, not sure if that's feasible. E.g. Psalm has many different taint types. psalm.dev/docs/security_analysis/#taint-types
personally I think the value of “is_literal” is it's not a full taint analysis
It is simple and predictable, and not a huge implementation burden.
@Andrea is_potentially_tainted ^^
Okay Google, play Tainted Love.
@Girgias For Stringable, I want to add a "changelog" block to the toString section on the magic methods page. Is there a good place to copy that from, or is it done some other way?
@Crell Heu let me think of that, might want to merge my OOP Refactor section PR just before you look at this because I touched the magic method section quite a bit by adding a changelog entry I think
22:38
Oh. Well, in that case I'll ignore this for now and move on to something else. :-)
I mean if you want to review the PR github.com/php/doc-en/pull/329 ;)
Still need to look at the error handling one again
I did review it, didn't I?
" &new; and &instanceof; can now be used with arbitrary expressions" - Uh, what's that?
@Crell The error handling one, the one I just linked is the Refactor OOP round 2
$ sapi/cli/php -r '$foo = "q";'
ast->kind 518
zval_make_interned_string: "foo" 16 0
zval_make_interned_string: "foo" 80 0
ast->kind 64
zend_insert_literal: "q" 496 32
zval_make_interned_string: "q" 496 32
zval_make_interned_string: "q" 496 32
zend_insert_literal: "q" 496 32
zend_insert_literal: "" 0 0
zend_insert_literal: "" 0 0
$ sapi/cli/php -r '$foo = "quack";'
ast->kind 518
zval_make_interned_string: "foo" 16 0
zval_make_interned_string: "foo" 80 0
ast->kind 64
zend_insert_literal: "quack" 48 32
Oh, you've got another one?
22:43
@Danack I stuck fprintf(stderr, "%s: \"%s\" %u %u\n", __func__, Z_STRVAL_P(zv), (unsigned)Z_GC_FLAGS_P(zv), (unsigned)Z_IS_LITERAL_P(zv)); at the beginning and end of both functions, here's the result
looks like it was literal going in to zval_make_interned_string, but not going out :)
so I guess we need to copy the flag there.
Sorry if I duplicated any of your investigation ^^;
@Crell Yeah I've got a couple, some possibly outdated.
new and instanceof can now be used with arbitrary expressions, using new (expression)(...$args) and $obj instanceof (expression).
from the migration guide
Hrm. I'm... trying to find a real example with 3v4l that breaks on older versions and not finding one.
@Danack I suppose zend_new_interned_string should probably copy the flag. That way any interning that happens, not just that done in zend_compile.c, will preserve literalness. One problem I foresee though: I think there's some kind of deduplication of interned strings, so is it a problem if is_literal() actually doesn't mean whether this string is literal, but if any string with the same value was a literal? I guess it's something to think about. Maybe deduplication can be disabled.
@Andrea my investigation was going to being sometime tomorrow, so confirmation is good.....and yeah, that behaviour would be surprising, which sounds bad for something related to security.
@Andrea Deduplication is kinda the whole point of interning...
22:51
s/being/begin.
@NikiC Not just turning off GC, I guess.
Anyway, fun coincidence that I would happen to randomly think of implementing something there's a current RFC about. I swear I hadn't seen or heard of it before yesterday.
@Girgias One tiny grammar point, otherwise looks good.
I... technically have access to merge it now. If someone can advise to make sure I don't do anything stupid. :-)
@Crell Well I can do the fix, squash it and rebase so that you can merge it
Sounds like a plan.
I've got instructions on how to merge doc prs... in French
22:57
To merge, do I just add your repo as a remote, do a local merge, push to master, and hope I didn't screw it up?
Actually… the is_literal() RFC is from a year ago. Looking at my inbox, I must have read about it then. The brain is good at laundering ideas…
@Andrea yeah, @CraigFrancis gave a talk about it at my local user group, trying to get people interested in the idea...
@Crell What I do is change the url of the PR by adding .patch so you get the git patch
Then
curl url | git am --signoff
Seriously, we apply patches? What is it, the 20th century?
git commit --am to edit the commit to add Closes GH-9999
Eh that's my process, you can add my repo as a remote and do the emrge locally
23:01
@Danack It does seem like a low-effort, high-reward idea to me.
@NikiC regarding type juggling of strings and numbers… this must be an unoriginal comment, but are you familiar with how Perl does it?
@Andrea Throwing symbol soup at the problem?
(aka having different operators?)
Yeah.
I mean… honestly, it's probably far too late to adopt the Perl approach in PHP, but it does seem like a more reasonable system
@Girgias So get the patch URL, checkout master on my local, run that command to apply the patch, and then just push?
@Crell Yeah more or less
Well, the test passed so let me see if I can do this without breaking everything...
23:06
Maybe there should be an ===-like version of the comparison operators, but I guess that is conceptually incoherent
<==> (The TIE/Bomber operator.)
@Girgias Well, whatever I did just closed the PR, so... I guess I did it right? Maybe?
@Andrea If we were to redesign the whole thing then I ... would just not have this problem in the first place ^^
3
@Crell You did :D
Whee!
Oh look, I started on Stringable weeks ago. I wonder why I never finished it.
@NikiC The thing is, there's no correct solution. It's the biggest problem area of weak typing. :(
Maybe PHP should just break compatibility once and for all and make strings not do numeric comparison. But provide fuzzy_cmp() as an alternative. Could be painful but it would settle the problem for good.
23:14
@Girgias github.com/php/doc-en/pull/478 - Stringable.
@IluTov sorry I missed this. Some words are here but why trying taint is not a great solution still needs to be written.....but basically, tracking whether a string was embedded in source code or not, is good enough to catch the big problem, which is people using variables where they are not aware precautions need to be taken.
@NikiC sorry if this was suggested already. An idea to solve the exponent comparison thing: only do it if both sides have a decimal point in them.
@Crell Added both to the tracker github.com/php/php-tasks/issues/26
@Andrea You can have exponent numbers without decmials. 2e5, for instance.
Trying to do taint tracking (which tbh, I would love to be in the language just for the name), leaves the problem of programmers having to be careful, and not make mistakes.....but it's not just making mistakes in their own code, it's not making mistakes across whole organisations. This guys talk goes into how taint tracking just didn't work that well for google, as it's just too hard to reason about.
23:27
@Crell indeed, but I think we never produce those by default
@Girgias Hm. For private methods no longer impacting inheritance, should that go on the inheritance page or the visibility page?
@Crell I would say inheritance?
OK. It's the shorter page so that works for me. :-)
23:40
@Girgias github.com/php/doc-en/pull/481 - private inheritance.
And I'mma call that a day.
Adventist ・ *General Issues ・ #80832
23:56
@Crell Added
I'll probably have a look tmr

« first day (3792 days earlier)      last day (1381 days later) »