Closed insinfo closed 4 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.
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?
@gabema Were you able to run SLIM on Peachpie?
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.
some progress on this, it is already possible to run the Slim Framework
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 :)
@insinfo I've send you pull request to use the latest peachpie build, seems to run with two modifications:
https://github.com/peachpiecompiler/peachpie/issues/694 (preg_split
fails to parse the regular expression) at testeSlimPeachPie\testeSlimPeachPie\vendor\nikic\fast-route\src\RouteParser\Std.php: 31
-- preg_split
++ $routeWithoutClosingOptionals; // preg_split
https://github.com/peachpiecompiler/peachpie/issues/695 (conversion NULL to Integer throws exception) at testeSlimPeachPie\testeSlimPeachPie\vendor\slim\slim\Slim\Http\Stream.php: 443
-- $fstat['mode']
++ (int)$fstat['mode']
@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.
updating to the latest version 0.9.910
should resolve the issues above
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();
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
I deleted the unit test folders and then it came to compile, but this one giving this exception