Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:25
    jakubmisek closed #555
  • 13:25
    jakubmisek commented #555
  • 13:23
    jakubmisek commented #552
  • 13:23
    jakubmisek commented #552
  • 13:13

    jakubmisek on master

    more mysqli functions (compare)

  • 12:40

    jakubmisek on master

    mysqli stmt bind & execute (compare)

  • 12:22
    jakubmisek labeled #556
  • 12:22
    jakubmisek labeled #556
  • 12:21
    jakubmisek closed #556
  • 12:21
    jakubmisek commented #556
  • 12:16
    jakubmisek closed #557
  • 12:16
    jakubmisek commented #557
  • 12:15

    jakubmisek on master

    diag of static call to an abstr… (compare)

  • 12:08

    jakubmisek on master

    not reporting `PHP5026` for abs… (compare)

  • 11:59

    jakubmisek on master

    abstract classes don't have pub… (compare)

  • 11:49
    jakubmisek edited #557
  • 07:34
    liesauer opened #557
  • 07:09
    liesauer opened #556
  • Oct 17 14:02

    jakubmisek on master

    mysqli stmt initial implementat… (compare)

  • Oct 17 12:07
    menturion commented #552
smx
@smx-smx
hmm forgot that i made a copy of the snk in the outputdir
it should probably be passed as first arg
but w/e, just a temporary hax (P.S. updated the workaround script to do this)
smx
@smx-smx
question: is it possible to get syntax completion in referenced .NET projects? (in PHP land i mean)
at least for methods and types
smx
@smx-smx
also another question: how to do typeof in PHP (i need to get the type of a C# class)
smx
@smx-smx
worked around it with Type::GetType(string)
where string can be Type,ContainingAssembly
L!εsAμεr
@liesauer
i don't recommend write too many c# stuff
L!εsAμεr
@liesauer
u can write a c# util library and interop with it in php
Jakub Míšek
@jakubmisek
@smx-smx there is a NuGet package that does the post-compile signing I think
@smx-smx the code completion would have to be implemented in our VSCode extension (https://marketplace.visualstudio.com/items?itemName=iolevel.peachpie-vscode), and yes it is possible
@smx-smx basically there is no syntax for typeof in PHP. \System\Type::GetType() is the best you can have. In order to make it in compile-time, we would have to introduce our own typeof() function that would be well-known to the compiler, or we can have an extension to PHP's ReflectionClass
Jakub Míšek
@jakubmisek
but FYI :) you can specify CLR attributes in PHP and you can use typeof as the attribute parameter value https://docs.peachpie.io/net/attributes/
Calvin Baart
@calvinbaart
@jakubmisek Finally have some time to go through the issues, I noticed that I'm now getting a compile error though: https://travis-ci.com/calvinbaart/laravel-peachpie-sample/builds/127831082 any hints? Its not really clear whats going wrong here (except for a null-pointer exception)
Calvin Baart
@calvinbaart
I get the same error when compiling Laravel 6.0.3 locally
Jakub Míšek
@jakubmisek
Thanks, nullref exception will be fixed!
Jakub Míšek
@jakubmisek
@calvinbaart nullref is probably fixed, if it's not it would help to see line numbers in the exceptions :)
Calvin Baart
@calvinbaart
Just triggered a new build: https://travis-ci.com/calvinbaart/laravel-peachpie-sample/builds/127975520 Currently at work so can't really debug, how would I enable line numbers for the exceptions?
(I guess using the debug build for the compiler would do that...)
Jakub Míšek
@jakubmisek
thanks, yes the debug build
Calvin Baart
@calvinbaart
Got past the compile stage now (into a crash at runtime, I'll look into that at home)
Jakub Míšek
@jakubmisek
thanks, I see. It's a new one as well right?
Calvin Baart
@calvinbaart
Yea, I removed a few patches though so its probably related to that (Carbon had a patch related to getLastErrors and setLastErrors, so its probably that)
Jakub Míšek
@jakubmisek
maybe, but this one is about expecting an array as argument but getting something else when calling a method inside __construct
thanks, Creator2 seems to be that
Calvin Baart
@calvinbaart
getLastErrors in peachpie has the [return: CastToFalse] attribute, but according to the documentation getLastErrors should always return an array. Maybe thats the problem
Jakub Míšek
@jakubmisek
just found it! you're right. I'll double check but I think even PHP returns FALSE if none of date functions were called yet
Calvin Baart
@calvinbaart
With #535 closed can we now require non-compiled .php files?
Jakub Míšek
@jakubmisek

@calvinbaart we've changed the getLastError() implementation so it never returns FALSE. Note in PHP it does return FALSE sometimes but it is not documented and I think developers (and frameworks) do not expect it anyway.

The only scenario where it can be used would be if someone would like to check if any of date-parsing function were used already by checking getLastError() is FALSE.

Calvin Baart
@calvinbaart
Great! Just triggered a new build to see if this resolves the issue: https://travis-ci.com/calvinbaart/laravel-peachpie-sample/builds/127997383
Jakub Míšek
@jakubmisek
thanks!
@calvinbaart the #535 only adds necessary API so w can get it implemented in future, but the whole eval() think is not ready for it yet. Note compiler needs the whole context, all the classes and dependencies. It cannot just compile a piece of it, or at least not efficiently.
We will use it for implementing FIleProviders in ASP.NET Core, so we can pack all the content files (.js, .css,...) into a .NET resource and serve it from there, and PHP's file functions will treat it like it is saved physically on disk.
Calvin Baart
@calvinbaart
That sounds interesting, Would be pretty useful for Laravel :)
Jakub Míšek
@jakubmisek
yes, basically the entire PHP component/web (like the entire wordpress) can be distributed and published as a single DLL file (approx 20MB large)
@calvinbaart we have changed the project's version from 0.9.9 to 1.0.0 (-dev)!
preparing for -alpha, -beta and -rc
Calvin Baart
@calvinbaart
Ic, I won't be able to change the versions now so I guess that will have to wait till tonight
Jakub Míšek
@jakubmisek
sure, thank you :)
smx
@smx-smx
thanks for replies @jakubmisek :)
thanks for the awesome work btw
Musti132
@Musti132
Any news on pthreads?
Calvin Baart
@calvinbaart
@jakubmisek After the latest fixes I started getting the compile crash again (perhaps I'm doing something wrong with the version?) so I tried building PeachPie in Debug for extra information but this gives the following assertion when compiling Laravel: https://travis-ci.com/calvinbaart/laravel-peachpie-sample/builds/128080202
Jakub Míšek
@jakubmisek
@calvinbaart let me add some more debug information
@smx-smx thanks!
@Musti132 no news
Calvin Baart
@calvinbaart
@jakubmisek Retriggered the build, this is the assertion message: Argument for params is expected to be of type PhpValue[], at Headers::__construct(). It looks like a PHP error so I'll look into it when I'm home