laravel-peachpie-sample icon indicating copy to clipboard operation
laravel-peachpie-sample copied to clipboard

Troubles running the project

Open smx-smx opened this issue 5 years ago • 5 comments

Hi. I was trying the project out. I'm using the feature/laravel-sdk branch, and i changed all instances of 0.9.9-dev to use version 0.9.41 (as available from NuGet).

Upon launching the app project and visiting the local webserver, this happens

      Request starting HTTP/1.1 GET http://127.0.0.1:5004/
Here2fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HLMSKF7FM9DK", Request id "0HLMSKF7FM9DK:00000001": An unhandled exception was thrown by the application.
ReflectionException: Class App\Http\Kernel does not exist in G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(793,8)
Stack trace:
#0 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(670,12): Container->build($concrete)
#1 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(263,12): Container->resolve($abstract, $parameters, $raiseEvents)
#2 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(790,12): anonymous@function($abstract, $concrete, $container, $parameters)
#3 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(670,12): Container->build($concrete)
#4 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Container\Container.php(618,8): Container->resolve($abstract, $parameters, $raiseEvents)
#5 G:\projects\laravel-peachpie-sample\Laravel\src\Illuminate\Foundation\Application.php(781,8): Container->make($abstract, $parameters)
#6 : Application->make($abstract, $parameters)
#7 G:\projects\laravel-peachpie-sample\website\public/index.php(55,0): Application->make($abstract)
#8 : {main}
#9 : ExecutionContext::RunInternal($executionContext, $callback, $state)
#10 : Task->ExecuteWithThreadLocal($currentTaskSlot)
#11 : ThreadPoolWorkQueue::Dispatch()

smx-smx avatar May 19 '19 21:05 smx-smx

I got further by removing MigrationCreatorFakeMigration from composer.json and running composer install.

I then had to change launchSettings.json to point to the correct build folder, and i had to create the directory tree bootstrap/cache under said directory

Now i'm hitting System.NotImplementedException on this line

        $tempPath = tempnam(dirname($path), basename($path));

in Laravel\src\Illuminate\Filesystem\Filesystem.php

Which comes from this location in PeachPie... https://github.com/peachpiecompiler/peachpie/blob/855b9a688db32a478c98b1c9bc6d1eb6e14bbe1b/src/Peachpie.Library/FileSystem.Path.cs#L237

smx-smx avatar May 20 '19 21:05 smx-smx

Hello! Bit late response but the original code in this repository (the master branch) is more of a proof-of-concept then an actual use-by-other-people project. I'm currently working on a more accessible version in feature/laravel-sdk (not yet working though, I'm mostly working on getting unit tests running with PHPUnit so that I can see what's not working).

This new version also includes a way (as soon as I get it fully running) to create controller's (and extend laravel in general) in C#.

calvinbaart avatar Aug 15 '19 20:08 calvinbaart

Examples of that can be found here: https://github.com/calvinbaart/laravel-peachpie-sample/blob/feature/laravel-sdk/app/Program.cs#L55 https://github.com/calvinbaart/laravel-peachpie-sample/blob/feature/laravel-sdk/app/TestController.cs

calvinbaart avatar Aug 15 '19 20:08 calvinbaart

Hi, thanks for the reply 🙂 I was interested in Laravel on PeachPie (with the intention of making a Web UI for a WinForms Desktop app), but i know it's not ready for general usage yet.

I was interested to give it a go, see if i could reproduce your setup/environment and maybe give a hand in the process.

I remember i wasn't sure about the 0.9.9-dev version reported in your .csproj files, and i tried to replace them with the latest released one. I wanted to try using a locally built PeachPie version but i wasn't entirely sure how i could properly use that instead of the one on nuget.org

smx-smx avatar Aug 16 '19 21:08 smx-smx

The current version in the feature/laravel-sdk branch should be runnable, although I haven't tested the .sln file in a while (dotnet run from cli seems to work).

Steps to run for now:

  • Execute composer install in the Laravel folder
  • Execute composer install in the website folder
  • Execute dotnet run in the app folder

Current issues are:

  • Can't run PHPUnit yet (see https://github.com/peachpiecompiler/peachpie/issues/422 and https://github.com/peachpiecompiler/peachpie/issues/471 )
  • No OpenSSL extension yet (so no encryption, see https://github.com/peachpiecompiler/peachpie/issues/402 )
  • No Artisan yet (so for example view:cache can't be run yet, this causes problems as blade files are compiled on-the-go otherwise which doesn't work with PeachPie)

And I haven't even touched anything database related yet.

I have been making bug reports to PeachPie with small reproducible test cases of bugs I find in Laravel.

My current top priority has been getting PHPUnit to run correctly so I can index what does and doesn't work.

calvinbaart avatar Aug 16 '19 22:08 calvinbaart