For example, I develop on a Mac and deploy to Linux (so, similar systems, but not identical). That being said, you do still need to worry about the same issues that anyone worries about. So, in general, there really aren't that many differences in PHP land. And for directories, just make sure you always use the "/" directory separator - PHP is smart enough to turn that into "\" on Windows, I believe. I actually never use PHP_EOL - so it might be something needed in Windows for some things (I'm a bit ignorant about this), but it's probably not something that you'll need to worry about too often. There is definitely some truth to this, but it might be as big of a concern as you think. Next! About your developing on Windows versus deploying on Linux concerns. It's of course always safe to run "composer install" - if all the files are already there, Composer won't try to re-download them. Sorry about the confusion - the real answer is "it depends" :). then you actually *won't* have the vendor directory, because it is ignored by git. But if you, for example, did a "git clone" or "git pull" on your server to get all the files. If you copy *all* of your files, then you don't need to run composer. > If I copy all my files, why would I need to run Composer? I hope that helps - let me know if it does/doesn't! We also use platform.sh for some of our services - which is a nice way if you don't like to manage your servers.Īlso, the official Symfony guide on this is also good - it'll give you some similar information: and that's about it! Here on KnpU, even to this day, we use a simple shell script to do execute all of this (which is kind of crazy, but it still serves us well enough that we haven't changed it yet)/. (the extra flag here is a small performance boost)ģ) Clear your cache and maybe execute doctrine migrationsīin/console doctrine:migrations:migrate -env=prod īut, the essential deploy steps are pretty simple:ġ) Get your code up to the server (there are several valid ways to do that) How to deploy? We actually don't have a (recent) tutorial on this, in part, because it's a changing area and there are so many potential tools, options, or even services! But, I do have one older tutorial, which still covers the essential steps - it's for Symfony 2, so a few minor things have changed. A better setup is to develop locally (or perhaps locally inside a virtual machine) and then deploy your code up there. You're absolutely right - you probably don't want to actually develop up on your server (some people actually do do this, but it's not totally normal, and it requires setting something up, for example, that auto-syncs up to your server on save, so that you can have the files locally). Then just repeat the same for a new feature :) And then, if you like TDD/BDD, you write a test and then write code to pass the test. First of all, you need to have a task with described feature you're going to implement. īut in general, the process *is* the same we show in our screencasts. and Behat course if you wonder about BDD. You can take a look at our new PHPUnit course when we show what' TDD in practice. Also, there're a few "hipster" methodologies like TDD and BDD, when you write tests first and only then write code. with a basic set but constantly improve them. Then, you need to prioritize them - you'd probably want to start with most important features, i.e. Well, first of all, you need to get a project specification, i.e. Yes, for educational purposes and mostly tutorials are focused on a specific set of topics, but actually this is exactly what you do when developing a real project (you just can have more topics in your project at once).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |