Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Migrate to Laravel 5 #54

Closed
mrusme opened this issue Jan 6, 2015 · 33 comments
Closed

Migrate to Laravel 5 #54

mrusme opened this issue Jan 6, 2015 · 33 comments

Comments

@mrusme
Copy link
Member

mrusme commented Jan 6, 2015

This isn't something that needs to be done now, nor tomorrow, nor in a month - it's more of a backlog task that needs to be done someday, when Laravel 5 became available and got mature enough to be used in production.

@jasondavis
Copy link

With all the Laravel 5 changes, it may be easier to do this upgrade sooner than later after the app has grown larger. Just a thought

@Liongold
Copy link
Contributor

I think a sort of feature freeze would need to be done before migrating. So
I think there should be a rough timeline before this is started.

On Sunday, February 15, 2015, Jason Davis notifications@github.com wrote:

With all the Laravel 5 changes, it may be easier to do this upgrade sooner
than later after the app has grown larger. Just a thought


Reply to this email directly or view it on GitHub
#54 (comment).

Sincerely,
Jean Spiteri.

@ghost
Copy link

ghost commented Jun 16, 2015

There's actually Laravel 5.1 around and I think we need to start considering upgrade while it is still can be performed

@JamborJan
Copy link
Contributor

I guess making a PR to the dev branch is the right approach to help with this topic?

@ghost
Copy link

ghost commented Jul 26, 2015

Yes, it is. But what's the rash?

@JamborJan
Copy link
Contributor

The Laravel guys don't help with issues we have / might have because the version used in Paperwork now is EOL, see laravel/framework#9755

Of course the upgrade is not the direct solution to my issue and not the most efficient way of solving it. I wanted to check how complicated it is and maybe it can be a partial work result of my way down the road.

@Liongold
Copy link
Contributor

Liongold commented Aug 2, 2015

@JamborJan So would you be interested in doing this?

@JamborJan
Copy link
Contributor

Hi @Liongold, I have solved my problem with a work around by fixing the small bug in the old framework myself. I have some tasks on my to do list before I can start working on that. So if there is no pressure I could work on that later.

@Liongold
Copy link
Contributor

Liongold commented Aug 4, 2015

@JamborJan That means Paperwork for Sandstorm is working now?

@JamborJan
Copy link
Contributor

@Liongold it has been working also before with the old Paperwork version. The Problem here was that no migration scripts where provided for this older version to the latest one. The occurring database errors have not been displayed properly which made debugging impossible.

Now I have figured out a way to detect this and only display an export page so that users can export the data and import it in a fresh new instance. Details see: https://github.com/JamborJan/paperwork/issues/13

Now I need some more testing and optimization and then we maybe should talk about if it is possible to include the changes to run Paperwork on Sandstorm in your master branch.

@Liongold
Copy link
Contributor

Liongold commented Aug 5, 2015

@JamborJan Did you close the HTTPS support issue in your repo then?

@JamborJan
Copy link
Contributor

Nope @Liongold because in "Sandstorm mode" it is only working with the workaround I have implemented. See: https://github.com/JamborJan/paperwork/issues/20

@Liongold
Copy link
Contributor

Liongold commented Aug 5, 2015

OK thanks.

@andrewwippler
Copy link

It is now a year later - is there a dev branch for migrating to Laravel 5.2?

Currently, 5.3 is rc1 and I am aware of two Laravel 5 HTTP/2 middleware that would increase the speed of loading assets. With Let's Encrypt available, self hosting https (required for HTTP/2) is not even an issue.

@mheppner
Copy link

Take a look at my branch. It's mostly functional, but there's quite a bit missing. It's upgraded to 5.3 and I'll get it up to 5.4 shortly. I forked it from dev, so hopefully I'm not missing too much from master. Not sure how you want to do this, but what about creating a new laravel5 branch here then I'll submit a pull request to it? That'll allow others to fix my mistakes before this gets merged into master. That merge is probably going to be pretty brutal. Some items that still need attention:

  • Setup script has not been tested or modified
    • Instead of using the JSON files, what about something like Brotzka/laravel-dotenv-editor? I don't think you have to use the GUI.
    • This would be more in line with using the environment variable files of Laravel 5, and would take out a lot of custom work being done in the configs
    • Current if-statement for checking of the config file exists should be moved to a new middleware
  • LDAP authentication - I see a lot of references to it, but I'm not sure how to test it
  • Authentication controllers - Laravel 5.3 has new authentication controllers. The current one seems to be working fine, but if you want to update them, now's the time to do so.
  • There are 2 migrations, 2016-10-03 and 2016-10-21, that I had to completely comment out since they're Postgres-specific...why do those exist?
  • Dockerfile hasn't been tested yet

@Liongold
Copy link
Contributor

Very good work on that. On the way forward, I'd ask @mrusme sine he is the owner of the project. About your other questions, LDAP authentication - I presume using an LDAP account to test it (I've never used it so don't really know), the 2 postgresql migrations set some defaults that mysql sets automatically but postgresql does not. If you need anything else, just ask.

But again, about the way forward, it's better if you ask @mrusme.

@mheppner
Copy link

The postgres migrations errored out on MySQL, preventing the remaining migrations from running, so it seems a bit odd to have them. Maybe it's caused by Laravel defaulting to strict mode for MySQL 5.7?

@Liongold
Copy link
Contributor

Are you sure you're running the latest version? Those files have been changed, some days ago to not run if the user is on MySQL. Can you re-check please?

@mheppner
Copy link

@Liongold like I said, I forked from dev. The project layout in Laravel 5 is pretty different, so it's going to be difficult to figure out what was changed. I'll take another look tonight or tomorrow and maybe try merging in the changes from master from where dev was last updated.

@mrusme
Copy link
Member Author

mrusme commented Feb 15, 2017

@Liongold
Copy link
Contributor

Thanks @mrusme.

@mheppner
Copy link

@mrusme sorry, I didn't see this! I just opened #764. Please test it out, I'll fix a few things tomorrow.

@mrusme
Copy link
Member Author

mrusme commented Feb 27, 2017

@mheppner could you please solve the conflicts? Would like to merge it for people to test, but can't do that currently.

@mheppner
Copy link

mheppner commented Apr 5, 2017

Has anyone tried out this branch yet? Any plans to update master?

@JamborJan
Copy link
Contributor

Hey guys, what is the corrunt status here? Can it be tested? If yes let me know and I'll do so.

@Liongold
Copy link
Contributor

Liongold commented May 2, 2017

@JamborJan You should be able to test it. I think it should work except for what was specified as not working in #764 itself.

@ivanvastag
Copy link

Any status updates? Help needed? I could try and contribute if needed.

@JamborJan
Copy link
Contributor

Hey guys,

I was able to makes some tests. Unfortunately I cannot dig into this further right now. Maybe you can do something with my feedback.

First I had issues because the folder structure slightly changed. It used to be paperwork/frontend/app/storage/config/ and now the app level is away: paperwork/frontend/storage/config/.

I’m getting errors when the mysql database is initiated:

  SQLSTATE[28000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)

And some when the UI is fired up:

RuntimeException in compiled.php line 13520:The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
1. in compiled.php line 13520
2. at Encrypter->__construct('SomeRandomString', 'AES-256-CBC') in compiled.php line 7927
3. at EncryptionServiceProvider->Illuminate\Encryption\{closure}(object(Application), array()) in compiled.php line 1477
4. at Container->build(object(Closure), array()) in compiled.php line 1433
5. at Container->make('encrypter', array()) in compiled.php line 2011
6. at Application->make('Illuminate\Contracts\Encryption\Encrypter') in compiled.php line 1534
7. at Container->resolveClass(object(ReflectionParameter)) in compiled.php line 1511
8. at Container->getDependencies(array(object(ReflectionParameter)), array()) in compiled.php line 1497
9. at Container->build('App\Http\Middleware\EncryptCookies', array()) in compiled.php line 1433
10. at Container->make('App\Http\Middleware\EncryptCookies', array()) in compiled.php line 2011
11. at Application->make('App\Http\Middleware\EncryptCookies') in compiled.php line 10064
12. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
13. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 3374
14. at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 10069
15. at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
16. at Pipeline->Illuminate\Routing\{closure}(object(Request)) in compiled.php line 10054
17. at Pipeline->then(object(Closure)) in compiled.php line 2519
18. at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2503
19. at Kernel->handle(object(Request)) in index.php line 53

bildschirmfoto 2017-08-11 um 14 28 03

@mheppner
Copy link

@JamborJan did you try clearing the caches? Try artisian key:generate and then artisian config:cache. Check your .env file or the config/app.php file to see what length your key is.

@JamborJan
Copy link
Contributor

JamborJan commented Aug 11, 2017 via email

@mheppner
Copy link

@JamborJan which PHP version are you running?

@JamborJan
Copy link
Contributor

I just noticed that the build process is still using php PHP 5.6.30. I could change that to the latest version 7 soon. Will check if this works out of the box.

@mrusme
Copy link
Member Author

mrusme commented Feb 8, 2018

Closing in favour of https://github.com/twostairs/paperwork/tree/2

@mrusme mrusme closed this as completed Feb 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants