Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Danny van Kooten:
Moving from PHP (Laravel) to Go
Apr 27, 2017 @ 15:14:04

Danny van Kooten has an interesting post on his site sharing his experience in converting a Laravel-based application to Go, briefly describing some of the changes made, performance differences and the lines of code required.

Earlier this year, I made an arguably bad business decision. I decided to rewrite the Laravel application powering Boxzilla in Go.

No regrets though.

Just a few weeks later I was deploying the Go application. Building it was the most fun I had in months, I learned a ton and the end result is a huge improvement over the old application. Better performance, easier deployments and higher test coverage.

He talks about why he selected Go and some of the external services he would need to interface with to make the transition complete. He then gets into the actual porting of the codebase and some of the challenges involved to replace Laravel functionality. With the application ported, he then compares the performance of the Laravel application versus the Go version, sharing the request of requests/second for each. He finishes out the post looking at a lines of code comparison between the two and how testing was handled on the Go side.

tagged: laravel move rewrite application go summary experience performance

Link: https://dannyvankooten.com/laravel-to-golang/

Fabian Schmengler:
Using class_alias to maintain BC while moving/renaming classes
Sep 09, 2016 @ 16:55:12

In a post to his site Fabian Schmengler has shown how to use class_alias to prevent breakage while renaming or moving classes around in your application during refactoring.

Sometimes you want to rename a class or move it to a different namespace. But as soon as it is used anywhere outside the package, this is breaking backwards compatibility and should not be done lightheartedly.

Luckily there is a way in PHP to have both, the old class and the new class, while deprecating the old one: class_alias().

He then gets into the details of using this handy function to define the links between the files, necessary in two different places to prevent autoloading breakage. He also offers an alternative, making use of the "autoload.files" option in the Composer configuration (but this means adding each one to that list). He finishes the post by suggesting one more thing as you update your code: making it with an @deprecated annotation to help locate it later (and flag it in your IDE of choice).

tagged: classalias function maintain backwardscompatibility move rename class refactor

Link: https://www.schmengler-se.de/en/2016/09/php-using-class_alias-to-maintain-bc-while-move-rename-classes/

Chris Jones:
How (and when) to move users to mysqli and PDO_MYSQL?
Nov 26, 2012 @ 17:04:25

Related to a recent discussion on the php.internals mailing list, Chris Jones has posted about moving away from the MySQL extension in favor of the MySQLi functionality and the effort bubbling up to make the old functionality deprecated.

An important discussion on the PHP "internals" development mailing list is taking place. It's one that you should take some note of. It concerns the next step in transitioning PHP applications away from the very old mysql extension and towards adopting the much better mysqli extension or PDO_MYSQL driver for PDO. This would allow the mysql extension to, at some as-yet undetermined time in the future, be removed.

He links to a RFC that's been posted to help promote and push this idea forward with mentions of the "carrot" and "stick" methods for pushing users towards mysqli.

As always, there is a lot of guesswork going on as to what MySQL APIs are in current use by PHP applications, how those applications are deployed, and what their upgrade cycle is. [...] I want to repeat that no time frame for the eventual removal of the mysql extension is set. I expect it to be some years away.
tagged: mysqli mysql pdo move deprecate phpinternals discussion

Link:

CodeIgniter.com:
CodeIgniter Wiki Moved
Jul 06, 2012 @ 13:15:19

As is mentioned in this new post to the CodeIgniter project's main site, their wiki has made a move. You can now find it on github.

In addition to having the convenience of existing as a git repo itself, moving this content to GitHub will help distinguish EllisLab and Reactor created content from community managed resources. It will also reduce the attraction of spammers to the CodeIgniter.com web site, as the wiki was a common location used by spammers and vandals to get content on our site that was less likely to be found and moderated than the frequently visited forums.

You can make changes if you see something incorrect by cloning the repo and making changes to the wiki repo and putting in a pull request.

tagged: wiki move github clone resource

Link:

DevShed:
Handling File Data with PHP (Reading & Seeking)
Dec 01, 2011 @ 16:09:14

DevShed has posted the fifth part of their "handling files in PHP" tutorial series today (excerpted from the book "Beginning PHP and PostgreSQL 8: From Novice to Professional") with a focus on read from multiple places in a file to get to different data.

In this fifth part of an eight-part series on working with file and operating systems with PHP, you'll learn how to read data from a file and move the file pointer.

Example code is included showing how to use the file, file_get_contents, fgetc, fgetcsv, readfile and fscanf (among several others). Also included is code showing how to use the fseek method to move around in a file.

tagged: tutorial file handling read seek move

Link:

PHPMaster.com:
PHP is Moving to Git (Eventually)
Sep 19, 2011 @ 16:54:04

Recently the PHP project announced a move to git as the primary version control system for the language's development. In a new post to SitePoint's PHPMaster.com site, Davey Shafik explains what that means to the average developer and what you can expect of the future.

Just over two years since its move from the antiquated CVS to Subversion (SVN), PHP is once again on the move: this time, to Git. Well, eventually. The migration from CVS to SVN was a huge one and took many months. The need for the PHP project to support its user base, hook scripts (commit mailing list, etc.) means that any change of revision control software means quite a large commitment. This is why even though the voting is over, and the dust has settled, we won’t be seeing PHP on Git until the end of this year.

Davey shares his vote - pro-git - and explains what his choice (and many others') means for the language, including a modified patch acceptance policy and a convenience for developers to be able to work anywhere.

All in all, I feel migrating from Subversion to Git can only be a good thing for the PHP project and the community as a whole. [...] it is pretty clear that the PHP development community is in favor of the decision.
tagged: language git svn move community future

Link:

Community News:
PHP version control to move to git
Sep 08, 2011 @ 11:27:08

A little while back, the PHP development group posted a survey of developers asking them which version control system they'd like to see the PHP project use. By an overwhelming margin, git has won and things are already in motion to move parts of the project away from subversion.

In his mailing list post, David Soria Parra explains:

After 2 weeks of voting and discussion, I closed the votes today. The results are fairly straightforward. Most of the users want to move to a decentralized version control system. [...] I don't want to make a difference of who voted for what. I think the results are overwhelming in favor of Git.

He'll be working on the spec to make the move for the PHP source over to git and is planning a cut over some time in December. Stay tuned to the php.internals mailing list for more details about the move as they come up.

tagged: git subversion svn move distributed version control

Link:

Derick Rethans' Blog:
Xdebug on github
Jun 23, 2011 @ 13:08:12

As Derick Rethans notes in his latest post, the Xdebug project is now on github and can be found under his account.

I've just opened my Xdebug repository on github. Importing my old SVN repository was a bit of a task. With the help of Ole Marius Smestad I managed to cook up a bash script to import and fix-up the repository. In the meanwhile I've learned more about git than I ever wanted to know, but still not enough.

Besides the source for Xdebug itself, you'll also notice repositories for the Xdebug website, the GtkDBGp client and the DBGp protocol definition.

tagged: xdebug github move svn git website gtkdbgp dbgp

Link:

Godaddyhostingreview Blog:
How to move Magento from Production to Live Server
Jul 05, 2010 @ 15:47:26

Setting up and using the Magento e-commerce application can be a difficult process in itself, but when you start moving things around from server to server, things can get even more complex. In this new post from the Godaddyhostingreview blog they talk about moving a Magento instance from your local install out to a live site.

This is the method I used to move my local copy of magento store from WAMP on windows to a shared hosting account. In my case am using magento1.3.x.

The instructions are detailed right down to which configuration values to change, how to update your database for the move, what will need to be removed before you and push everything over. There's even a bit of instruction on what to change if your database structure is slightly different.

tagged: magento move tutorial production live server

Link:

CodeIgniter.com:
SVN Repository Location Moved
Feb 05, 2010 @ 17:38:36

Just a quick note today from the CodeIgniter project - if you've been using their Subversion server to pull your latest copies of the framework down, they've made a change.

Our Subversion repositories have moved. Please update your repositories or check out new ones from the new location: http://svn.ellislab.com/CodeIgniter/trunk

The normal downloads (and archive files) are still available on the CodeIgniter download page.

tagged: codeigniter svn repository move

Link:


Trending Topics: