@cmb went ahead and added another <sect2> for the "see also" text. I'm going to go ahead and commit it. If I need to make changes, let me know. Thanks for your help.
@cmb yeah, feel free to close either one, communication with the author is somewhat difficult. It seems he doesn't understand git and I am unsure why he created the same PR
@cmb - the final change is not ideal either but I lack the C skills to clean it up. He basically copied another method and hard-coded a few of the if-statements. It works, but it aint pretty.
I have an extension function called has_right and that expect an array. Now I want to send from twig ann array with the some constants I though it should be like this but apparntly I am wrong. How can I use this?
@Tpojka sorry I am trying to debug to create the error it just giving me 500 page not found. I do know it is because of this. I will try to get the error
@Derick It provides before/after callbacks. It doesn't give you persistent call data between begin and end (but if it's per function you can use the runtime cache).
I don't see the point of moving to a new API to be honest. It doesn't improve anything, and I'd have to maintain two versions (for < 8.1, and for >= 8.1).
This way it's all maintained in the begin/end, and you use execute_ex for the older versions.
So it's not really two ways of doing things...
Does anyone have time to explain to me how the opcode specializations actually work? I've never understood that part, and Dmitry is suggesting that we do a specialization for observer.
If I changed my password on master.php.net, does it have to sync to svn.php.net? I can't make commits to doc-en, it gives the error "authentication failed," but I'm copying/pasting my password from my password manager, and I'm able to log in to master.php.net, no issue
Asteroids comes hurtling at Earth > Huge international effort to design space mission to deflect it > Mission goes off alignment and crashes into the moon > World power grids fail as every government on earth rushes to Git Blame the guidance system.
Hi, I am looking for opinion on sending RESTful requests and isn't necessarily PHP related. Is it a good idea to accept POST requests like this: /team/{teamId}/projects/create and a request body along with it? Or should I stick with /projects/create and pass the teamId in the request body itself? teamId isn't a secret that I need to protect or anything and can be exposed.
@MarkR Right, it seems to me that POST /team/{teamid}/projects/create is a bit more understandable (at least to me), but I guess the standard way makes more sense.
@beberlei it's.....not small. But also which of them are needed depends on which version of ImageMagick are being used.....my question for Remi is going to be, can IM6 be dropped or would that be too annoying for him.
@cmb I don't think you should just set it to static_variables though, that would modify the shared array. You probably want something closer to what the ZEND_BIND_STATIC opcode does
@LeviMorrison yeah sure. It will either dispatch to the specialized handler, or emit specialized code
@Girgias for the record, my gut instinct is that we should expose the ICU library pretty verbatim, and then people would be able to wrap those functions in nicer to use APIs in userland.
Thanks for sharing that, I think I want to push my new company to set that up because we are using HTTP requests for things that should not be done with HTTP requests
I am moreso talking about tasks that run every interval on the dot (sync something up every hour, for example)
I may be missing something though and messenger might be able to do that
I do see some recipes for it but nothing native Symfony
I haven't heard of yacron, I will look into it though. But yeah how Laravel works is the cron job will run the task scheduler every minute, and the task scheduler will contain a list of commands/jobs that should be ran and how often they should be.
That way there's version control for your scheduled tasks as well
Oh that actually makes sense. At my last job we had docker-compose files but there wasn't much to them. I think they were configured wrong though because running tests in the docker container took 10x as long as running them in Vagrant
Not an exaggeration, my manager would sit there for 30 minutes while the tests ran in docker - and when I ran them in Vagrant it was less than 3 minutes
This also gives you a single entry point for all your scheduling needs. So you only need one cron to run minutely and you can control multiple tasks from it
We're partnering with Lando at Platform.sh. It's a fairly nice system, although it definitely encourages you to build off of one of its pre-made templates.
@NikiC maybe another area as to why BreakIterator is failing is in the _breakiter_factory() function in breakiterator_methods.cpp because there is a RETURN_NULL(); in it
@Crell Funny, I was thinking of asking you what you think of it (since you work in the whole containerization business). So far it works pretty well, plugins definitely need more work.
They're building an extension that reads our config files and builds a local version of the project defined on Platform.sh, using our container images.
@IluTov also the 90s are calling, they want their "Hey X is calling, they want Y back" joke format back
@Tiffany yes, yes you really very very should
I can tell you from personal experience that falling off your bike can potentially be very very bad, I feel naked on a bike without helmet and so should you
@Danack because they are formatted just right: there is no whitespace everywhere where there shouldn't be (array_diff ( array $array1 , array $array2 [, array $... ] ) : array), and there is no [ ] around optional parameters. It would have taken me an eternity to use the signatures from the manual. Ah and not speaking about the mixed type! It wasn't natively supported that time when I did most of the stub work.
@LeviMorrison github.com/php/php-src/compare/master...iluuu1994:partials-2 I really just started, it's very ugly and just works for internal functions right now. Work is needed for user-land functions, methods, closures, in all combinations. Variadics are missing. The closure should also copy the given param/return types from the wrapped function.
And as mentioned, I have literally no idea what I'm doing ;)
Also, Nikita and Bob suggested creating a separate function call instruction instead of using ZEND_DO_ICALL.
@IluTov If I followed this correctly (maybe not, just woke from a nap) then you actually make a full call for the partial function, and then return a closure?
@LeviMorrison Ah and what I also forgot, there's also some memory management stuff that we need to deal with. E.g. $x = $closure(?); should keep the closure alive for as long as $x is in scope.
I was actually think about implementing the specialization of |> and partials first. We want $var |> var_dump(?) to compile to the same or nearly the same opcodes as var_dump($var).
The only difference we'd want is perhaps something that indicates it was transformed from |> (may help debuggers or something for line numbers).
Well, I wouldn't say irrelevant; having that optimization is pretty critical. I get the essence of what you are saying though. We still need the standalone thing.
@LeviMorrison Not sure if partials should even be used with a single param, in that case you're probably better off just passing the callable string, given that $foo|>'bar' is currently syntactic sugar for ('bar')($foo). Not sure if the string has any performance implications, that can probably be optimized away.
@LeviMorrison The current patch for |> does compile to the same opcode as foo($bar). It's just limited in that foo() has to be single-parameter and there's no special syntax for it.
And there is a flag to indicate where it came from.
As long as the RHS is one of the valid function call types and has only a single ? then it should be pretty easy to substitute the LHS into there, right?
Also, why you wouldn't just do $words = $lhs; array_map('strtoupper', $words); is beyond me. I mean, they wants to add optional type checking, but I don't see the point of tacking that onto this feature even if it was feasible in the grammar.
Honestly, part of me is thinking why we don't just focus on scalar methods. $array->map(...) would be much cleaner than $array |> array_map(..., ?) IMO.
Yes, pipes have some other use cases, but I'm expecting it mostly to be used for array and string operations.
@IluTov If you did ever want to pursue that then I think very solidly we'd need extension methods, as otherwise you end up doing MyOrg\array_fn(/*...*/) or such and then you are straight back to a dichotomy.
@LeviMorrison I proposed extension methods for scalar types a while ago but the idea was disliked. People would prefer a fixed set of methods. That is if I understood you correctly. I don't get the second part of your sentence.
Yeah, sounds like you understood me, but I guess I disagree with "people".
What's the point of moving to scalar methods if for any "methods" of my own I have to use "function" style anyway? May as well just leave them all as functions.
@LeviMorrison I guess the concerns are 1. disambiguation between built in methods and user provided methods 2. there's little trust in user-land coming up with a good API
@LeviMorrison So I guess that's kind of the point. Global extension methods probably don't make much sense because just imagine two libraries each using a different set of scalar extensions, that makes them completely incompatible. And then there was just a general disliking of the alternative. Some concern with clashing function names, the syntax, the kind of unique behavior, etc.
@LeviMorrison There's a POC. There are issues with references but in general it does work.
Idk if it was related to the application or not but I was looking at it for a little bit thinking "Why does that company sound familiar" lol, been a long day
@IluTov @LeviMorrison The more I think on it, the more I think extension methods in some form would actually be quite useful. As noted, though, PHP's wonky loading style makes them, er, hard.