-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime error not captured #1074
Comments
Thank you, it seems the ASP.NET Core Middleware does not propagate the error to the request pipeline (I'll try to fix that) Anyways; there are errors and notices in the console and the debug Output pane:
|
both versions should be the same - otherwise you have a NuGet warning when building the project |
Sadly Laravel starts the response, so the developer exception page ( The iis express log contains all the PHP notices and errors tho. You can also handle the exception in Visual Studio or any other IDE while debugging. What we can do, is implement a "default" PHP exception handler and output the exception to the response by ourselves. But usually, it's all handled by ASP.NET already. |
So can i use the following?
Peachpie.NET.Sdk/1.0.0-appv4909
Peachpie.AspNetCore.Web/1.0.0-appv4909
Dennis Marksbury
"Do the best you can until you know better. Then when you know better, do
better." #MayaAngelou
…On Tue, Oct 25, 2022 at 8:08 AM Jakub Míšek ***@***.***> wrote:
Peachpie.NET.Sdk/1.0.0-appv4909
Peachpie.AspNetCore.Web/1.0.24
both versions should be the same - otherwise you have a NuGet warning when
building the project
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2CRGZVVN3WGPA7AXBDWE7ESPANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
So this is interesting... it says that the HttpKernelInterface is not
found... but I don't understand why it cannot find it... it is in the
project, exactly where I would expect it to be. What would prevent this
interface from being found?
Dennis Marksbury
"Do the best you can until you know better. Then when you know better, do
better." #MayaAngelou
…On Tue, Oct 25, 2022 at 8:22 AM Jakub Míšek ***@***.***> wrote:
Sadly Laravel starts the response, so the developer exception page (
UseDeveloperExceptionPage()) is not able to output its own content
anymore.
The iis express log contains all the PHP notices and errors tho. You can
also handle the exception in Visual Studio or any other IDE while debugging.
[image: image]
<https://user-images.githubusercontent.com/842150/197771597-c2199e3f-2177-480a-980b-2ae36d71c7bf.png>
What we can do, is implement a "default" PHP exception handler and output
the exception to the response by ourselves. But usually, it's all handled
by ASP.NET already.
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2CWNYHUKVYDARLQOJLWE7GIXANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
the latest official release is |
It is probably caused by the first error:
isn't this particular script file excluded from compilation? |
As far as I can tell, the HttpKernelInterface.php is included for
compiling...
[image: image.png]
Dennis Marksbury
"Do the best you can until you know better. Then when you know better, do
better." #MayaAngelou
…On Tue, Oct 25, 2022 at 9:08 AM Jakub Míšek ***@***.***> wrote:
So this is interesting... it says that the HttpKernelInterface is not
found... but I don't understand why it cannot find it... it is in the
project, exactly where I would expect it to be. What would prevent this
interface from being found?
It is probably caused by the first error:
PHP (Notice): Script 'C:\Users\jmise\Projects\LaravelOnPeachPie\Web1\Web1.Server\vendor\composer/../symfony/http-kernel/HttpKernelInterface.php' inclusion failed. Cause: Script file 'C:\Users\jmise\Projects\LaravelOnPeachPie\Web1\Web1.Server\vendor\composer/../symfony/http-kernel/HttpKernelInterface.php' not found. Search paths: include_path is '.', working directory is 'vendor/composer'
isn't this particular script file excluded from compilation?
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2HVNS3WNVOGPT6GRH3WE7LTDANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
My image didn't come through.... here's the line in the .msbuildproj file
So I would assume it is compiling it. |
I see!
Edit: ok not a bug :/ |
it is looking for: this file is indeed not compiled |
Question... so when the PHP classes are loaded, is it loading by namespace
or by physical path based on namespace?
…On Tue, Oct 25, 2022 at 9:49 AM Jakub Míšek ***@***.***> wrote:
it is looking for:
vendor\symfony\http-kernel\HttpKernelInterface.php
not:
vendor\symfony\Component\http-kernel\HttpKernelInterface.php
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2APBBILKTVVU3ULWGDWE7QNPANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
those are a few separate steps When the class that is not declared is used, PHP calls a class loader (in this case composer with its set of rules, usually based on the so-called PSR-4) Then the file containing the class declaration must be included -> composer does it by parsing the class namespace to construct the expected file path, it checks that the file exists on the file system, and then it includes it. If this fails, PHP throws a warning, but continues.
Finally, PHP actually uses the class (that's expected to be loaded now), which may fail with fatal error. |
Ok, I will try to move those files out of the "vendor" folder and into the
root to see if that helps.
Dennis Marksbury
"Do the best you can until you know better. Then when you know better, do
better." #MayaAngelou
…On Tue, Oct 25, 2022 at 10:26 AM Jakub Míšek ***@***.***> wrote:
Question... so when the PHP classes are loaded, is it loading by namespace
or by physical path based on namespace?
those are a few separate steps
When the class that is not declared is used, PHP calls a class loader (in
this case composer with its set of rules, usually based on the so-called
PSR-4)
Then the file containing the class declaration must be included ->
composer does it by parsing the class namespace to construct the expected
file path, it checks that the file exists on the file system, and then it
includes it. If this fails, PHP throws a warning, but continues.
With PeachPie, the file may exist on disk, but if it's not compiled, the
inclusion fails.
Finally, PHP actually uses the class (that's expected to be loaded now),
which may fail with fatal error.
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2AI6TIXFCSPTI6MLZ3WE7UZBANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@dennismarksbury it's not about moving the files ... they are there but explicitly excluded in your |
I deleted all folders that were explicitly excluded from the build in the \vendor\symphony folder... Removed the following line from the .msbuildproject file
Ensure that the compile include IS still there:
I still get the same error. |
As mentioned earlier, you're looking at wrong path:
That's the problem. Also everything is in the application log, I guess there is still the following: (not *\Component* in there) |
Ok, i've figured it out! all these classes are defined in autoload_static.php, which points to incorrect directories. I am working to clean this up. |
Hi Jakub
I know it's been a long while since I last worked on this... but I am
trying to get back to it... I am slowly making some progress...
I have found that there are some helper functions that Laravel has defined,
they seem to be "global" in nature... for example there are tap() and
value() and view() functions...
I am still trying to figure out where these functions are defined, but in
the meantime, is there a way to refer to them globally without altering a
ton of code? Here is a bit of reference for the tap()
https://laravel-news.com/collection-tap
Any help would be much appreciated!
Dennis Marksbury
"Do the best you can until you know better. Then when you know better, do
better." #MayaAngelou
…On Tue, Oct 25, 2022 at 11:05 AM Jakub Míšek ***@***.***> wrote:
As mentioned earlier, you're looking at wrong path:
vendor\symfony\http-kernel\HttpKernelInterface.php
*not:*
vendor\symfony\Component\http-kernel\HttpKernelInterface.php
That's the problem.
Also everything is in the application log, I guess there is still the
following:
PHP (Notice): Script
'C:\Users\jmise\Projects\LaravelOnPeachPie\Web1\Web1.Server\vendor\composer/../symfony/http-kernel/HttpKernelInterface.php'
inclusion failed.
(not **\Component** in there)
—
Reply to this email directly, view it on GitHub
<#1074 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOLO2GVYEY3ZMDTAA6C5OTWE7ZMRANCNFSM6AAAAAARESOWEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @dennismarksbury , Thanks for the details. Laravel does a lot of class aliasing, and global functions like
Although they are defined conditionally (inside |
When I run the application, the code is failing, but there is no error that I can find. If I debug into the code, I am only able to go part way through the code and then the code appears to crash, without any notification.
I have pushed the test projects to the following GitHub: https://github.com/dennismarksbury/LaravelOnPeachPie
Code fails here:
Web1/index.php : Line 52
Environment:
Windows
Visual Studio Pro 2019
Peachpie.NET.Sdk/1.0.0-appv4909
Peachpie.AspNetCore.Web/1.0.24
Question: is there a "preferred" environment?
The text was updated successfully, but these errors were encountered: