peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.32k stars 202 forks source link

how to run Slim Framework 3 and Eloquent 5.2 on PeachPie #398

Closed insinfo closed 3 years ago

insinfo commented 5 years ago

how to run Slim Framework 3 and Eloquent 5.2 on PeachPie, I'm trying to create a new project using PeachPie, but I can not get it to work, it's giving exception and many warning messages

The project is hosted on github https://github.com/insinfo/testeSlimPeachPie

Anotação 2019-03-30 161347

I deleted the unit test folders and then it came to compile, but this one giving this exception Captura de Tela (10)

jakubmisek commented 5 years ago

Great you try another framework on .net.

The warnings have descriptions so it is up to you to consider if they are serious or not. You can take a look on https://docs.peachpie.io/php/diagnostics/ for more information.

The runtime exception has its description as well. I'm afraid there is not enough information to debug and fix it for you here. If you'd have a small test case, we can help with that.

Suggesting to post a smaller issue with more specific questions.

gabema commented 5 years ago

Created a very simple hello world sample app with Slim / PHP 7.1 and it works. When attempting to run sample app using PeachPie (with project configured to use PHP 7.1 LangVersion) it results in the error shown above. This is as small an issue as you can get trying to use PeachPie with SlimPHP. Would it help if I uploaded the simple slim sample project?

insinfo commented 5 years ago

@gabema Were you able to run SLIM on Peachpie?

gabema commented 5 years ago

Nope, still trying to distill the differences between a simple slim example app running successfully on PHP 7.1 runtime vs PeachPie. Also considering whether to use a .NET based router implementation (MVC / which could meet my needs/be a better solution as long as I could adapt it to PSR7 interfaces.

insinfo commented 4 years ago

some progress on this, it is already possible to run the Slim Framework

jakubmisek commented 4 years ago

We have fixed tons of related issues recently, you may try updating to latest peachpie from appveyor (https://ci.appveyor.com/project/dotnetfoundation/peachpie)

NuGet feed: https://ci.appveyor.com/nuget/peachpie PeachPie version: 1.0.0-*

and trying again. We'll try to fix any issue you give us :)

jakubmisek commented 4 years ago

@insinfo I've send you pull request to use the latest peachpie build, seems to run with two modifications:

insinfo commented 4 years ago

@jakubmisek Hello, thank you very much for your pull request, I was very busy at work, I will test this afternoon to check if it is running.

jakubmisek commented 4 years ago

updating to the latest version 0.9.910 should resolve the issues above

insinfo commented 3 years ago

Sorry for the delay in giving feedback, but only now that I had time to test. A simple Hello Word from the Slim Framework in php is not working yet, throwing exception "Pchp.Library.Spl.TypeError:"

<?php

require 'vendor/autoload.php';

$app = new Slim\App();

$app->get('/', function ($request, $response, $args) {
    return $response->getBody()->write("Hello ");
});

$app->run();

image https://github.com/insinfo/testeSlimPeachPie

jakubmisek commented 3 years ago

reopened in https://github.com/peachpiecompiler/peachpie/issues/866