Upgrading Symfony 2.3 to 4.4 [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
How time consuming is migrating a medium/large sized legacy Symfony application from version 2.3 to 4.4 compared to rewriting it in a different framework?
From the research I've done it seems like quite a lot of stuff has changed between these versions so I'm trying to weigh this decision up against just rewriting the whole thing in Laravel (the framework I'm experienced in). I'm trying not to get stuck in a wormhole of rewriting abandoned code.
The main reason for the upgrade is security fixes, running Symfony 2.3 in 2021 doesn't seem like the best idea to me. The codebase won't need any changes in the near future.
Following is an overview of used packages.

Upgading you symfony version that much means 3 steps:
upgrading your php version (PHP 5.3.3 to 7.1.3)
upgrading your package (most of them will not work any more or have lot of changes)
upgrading symfony
It mostly depends of your code coverage: if you have a good code coverage, you will be able to quickly identify remainings bug
otherwise it depends on your legacy:
are best practice used?
is the code clear?
is the code well decomposed?
For larger project, i don't recommand to create a new one: it cost a lot of money and may prouce bugs and regression
The best way to do it is step by step. Determine which package to upgrade one by one, do it and push it in production with the apropriate code coverage.
Start with your php version: on local, have your devellopement be run in higher php version to identify most bugs and correct them
Manage each of your abandonned project to replace them with the recommended one
we had to deal with phpexcel to php spreadsheet. We identify each place where it was used in the application, and update each of them, one by one (having both package on project). When phpexcel wasn't used anymore, we deleted it

Related

Using legacy CodeIgniter project inside Laravel [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 months ago.
Improve this question
I have a legacy project built on codeigniter 3 and we're looking to upgrade to the latest Laravel version. From some of the answers here, I can infer that it is definitely possible, I have multiple questions before starting.
Would it be practical? (would making it work with each other be a huge enough pain to completely rebuild the system on laravel)
Would it work across different PHP versions? (Current: 5.something; desired: 8.1)
If they're both running on the same domain, would session management be an issue? (would I be able to share session variables across the frameworks?)
Thanks for reading
It looks like CodeIgniter uses lots of global variables.
https://codeigniter.com/user_guide/general/common_functions.html
I'm not a Laravel dev, but I'm assuming that as a relatively modern framework, Laravel does not rely on many globals by default. So I suppose there's more opportunity for conflict, but only if someone is abusing Laravel.
(Laravel people: Feel free to correct me on this.)
Regarding PHP 8: CodeIgniter has at least passed this guy's smoke test on PHP 8.
https://forum.codeigniter.com/thread-78091.html
Since minor versions theoretically don't contain breaking changes, you may find success on 8.1 as well.
Regarding sessions: I know nothing about how either framework handles sessions, so I can't speak to this.
As for whether it's a good idea: I'm not sure I fully understand what you're trying to do. Are you going to have a CodeIgniter project running side-by-side with a Laravel project, using a separate subdomain for each? Or are you going to try to make the existing CodeIgniter project live inside of a Laravel directory structure, as the title of the question currently implies?
If the latter, I would say you're in for some tears. It sounds very painful. The former could work pretty well, I would imagine, especially if you're already using your PHP mainly to serve API endpoints and can just gradually move all the endpoints over to the new platform, one at a time.
I hope this helps.

Is codeigniter 3 safe enough to start project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
First of all I should remind you I have read some links and done some research and looked at some old questions but I still have a question.
I want to start a project with codeigniter 3 but I have heard that codeigniter is not secure enough!
I don't know if it is correct or not, so I started researching about it but now I still don't know. Should I start my project with codeigniter or not! I don't know how to work with any other frameworks and I don't have enough time so I want to ask you if I should start my project by codeigniter. Is it really unsafe? and what shall I do to make it secure or is it possible or not?
I know that the security depends on programmer but I want to be sure that codeigniter does not have a big security bug that any hacker can hack my project and destroy it.
what would you do ?
I'm really afraid
Codeigniter is a framework and is not solely responsible for your site's security. Your site's security is truely determined by the code you write with CodeIgniter. An empty CodeIgniter install is very, very secure. Simply because it's not using any user input or operating with any database.
Codeigniter 3 is no longer in beta and has a stable release available here: https://codeigniter.com/download
If your concern is security, make sure you develop the site with security best practices. Typically, if a site is hacked, it's due to a lazy developer and not the framework they were developing with.
along with security are all the million other things that can go wrong on the server or "cloud" which is hosting your application. so -- even if its just you working on the app -- become comfortable with git and version control. i just discovered the phpstorm application for developing php code and it has version control built in, along with other features that makes it easier to maintain more then one working copy of your application.
otherwise to your question - Codeigniter is being actively maintained, has a friendly community, and the code is very fast & stable in production.

How to migrate PHP Code between versions 5 - 7 without rewriting or reviewing all the code [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm looking at update codebase I'm working with from PHP5 to PHP7 when PHP7 reaches full release (largely due to the fact the speed gains and the ?? operator could really help our site).
As there are deprecated functions, and some things that are altered between the versions, I'm considering using filemtime on php files before including them to see if I should include functions that will modify php7's behavior to act a bit more like php5 in regards to those files. Although this will work on the existing server, I know various copy methods (some down the pipeline that it will be hard to control) will likely change the modified date as files are copied.
Is there a method for determining which php version a file is written with or compatible with and interpreting them appropriately, or is this hacky and risky solution really my best bet?
On solution I see was inspired while hunting for solutions here: link
In short...
create two different localhost servers
set each localhost to link to a different version of php
write code afterwards that pulls from the old code as if it were pulling from a different server.
steadily migrate files from old to new version of php after initial migration.
As a result, instead of having to migrate the entire codebase, it can be migrated a chunk at a time, without having to do all-or-nothing all-at-once. It also should be more durable than the filemtime solution. The downside is that it makes it harder to immediately integrate old code into new code.
Still interested in better solutions, but at least it's a solution.

Publish website when using php framework (laravel) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm fairly new to web development and I have only published one website before. With that website I only used some PHP and without framework. Now, I'm planning on using the laravel framework for my next, bigger, website. I'm wondering if there are differences between publishing a website when using a PHP framework? If so, what are the major differences and where can I read about it (googling has not helped me)?
You have countless options. Here are some I am aware of:
1. FTP'ing
Basically, you could just publish your site/app by FTP'ing it up to your server. The biggest issue will be the Database-changes. Here, the main influence is, whether are you able to run migrations or not? You would at least have to have ssh-access to your server with the required prerequisites installed. Otherwise, you would need to keep track of the changes in some other way, and change the db manually (which is not an good option IMO).
2. Automated deployments
There are server-deployment automation-tools, the one i know is capistrano. You can write scripts which do the deployment. These tools are also capable of running migrations, if you tell them to do so, but you would need to have ssh-access for that. Google will tell you the rest, here is a good tutorial.
2.1. Push-to-deploy
If you use SCM for your "bigger project" (which i would highly recommend), you could use push-to deploy technologies. This approarch basically uses Git-Hooks for triggering deployment-scripts. Deeployer could take care of that for you, if you do not want to develop your push-to-deploy-solution from scratch. Other alternatives are Rocketeer (Open Source) or DeployHQ (Paid)
2.2. Using laravel-taylored hosting/deployment/server-management services
Services like laravel-forge or envoyer offer zero-downtime automated deployments. I guess they are also based on push to deploy anyway. If you want to learn more about them, i recommend watching the corresponding laracasts-series (Forge, Envoyer). Be aware that they are not free.
I hope this overview gets you started. Happy deploying!
There is no difference between publishing a plain PHP website and one with a framework. Simple FTP up all your files and it will work, just remember to upload the framework files also.

Is symfony 2.0 stable enough to use? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I wonder if Symfony 2.0 is stable enough to use?
Because I've never used Symfony before.
It seems that Symfony 2 is much better than the previous version and I don't want to relearn/recode everything some months from now.
When do you think it will be released?
Would it be a wise choice to use 2.0 now?
No.
Yes. http://symfony.com/download
http://symfony-reloaded.org/learn
Quote from above link:
Please note that Symfony 2 is not yet ready for production. The final release is planned for late 2010 and will only support PHP 5.3.2. In the meantime, we highly encourage you to use the current symfony 1.4 stable release for all your projects.
Symfony core team member here. No, Symfony2's not ready at all to be used in production, because it hasn't even reached the alpha state. As stated on the github page, things (especially the API) WILL change.
Furthermore, some components are not here yet, for example the Forms framework, so you would have to handle them by hand. Don't do that. But of course we'd be more than happy to get some feedback if you give it a try for a sandbox project of yours ;)
I would like to point out that we (www.exercise.com) are live and have been using Symfony 2 for a while now.
It has not been the most smooth experience (we try to stay up to date with the most recent sf2 branches on git, which is almost a full-time job for 1 person), but we have built a functioning site.
The largest hurdle right now to starting a project is the lack of documentation and examples online. So while it is possible to run a production site using Symfony 2, the framework still has a long ways to go until it can be used for a small project.
Yesterday at SymfonyLive 2011 (Twitter #sflive2011) Fabien said that the first Release Candidate will be March 2011.

Categories