Installation & Setup for Mac | Symfony 6 for Beginners | Learn Symfony 6 from Scratch

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up developers and welcome back to my new video where we're going to install all tools that you need when you want to create your symfony project quickbooks do you want to support the channel and want me to continue on creating content you can support the channel on patreon right now where you can benefit just as a private discord group where you can share your coding issues and other developers will help you out if you are interested to join the link will be in the description down below the first part of this video is based for mac users if you are interested in learning how to set up everything properly for windows or linux i recommend you reading through the documentation i've put on my github once you start learning symfony i kind of expect you to already have php and my sql installed if you have done that you don't need to follow the first part of this course but you can skip forward to the section where we install composer also you can install the same tools that i'm installing through brew since it will be exactly the same for windows and linux through their official website since symphony is created with php we obviously need to make sure that we have php installed i have deleted everything from our local machine to do it from scratch php can be installed through different ways you can set up xampp but i personally prefer to use homebrew homebrew is a third-party package that manages your applications on apple operating systems as you can see i'm currently located on the official website of homebrew which is homebrew.sh and right on the screen you'll see a section where they are telling us how we can install brew on our local machine as you can see it can be done through a bin bash command so what we can do is to click on the icon that we have right here to copy the entire line of code which needs to be pasted inside the terminal so i've already got my terminal installed and open and every mac device has one as well as you can see right now mine looks a bit fancier than yours but it will do the same exact thing now what we can do inside the terminal is basically command v to paste the line of code that we just copied and hit enter it's asking us for a password so let's simply add it hit enter it's telling us what it will be installing and you have the option to go back right now but we don't so let's hit enter and it's installing everything right now and homebrew is a very big software package so this might take a while so pause the video and i'll see you back once it's done alright as you can see pro has been installed for me so what i want to do right now is to run a command called brew help to double check if everything has been set up correctly as you might have noticed the command does work so brew has been installed i don't want to dive into brew because it could be an entire course for itself but what i want to do right now is to install php through homebrew most of you guys might have php installed since it is a requirement before diving into learning symphony therefore you can simply double check it by performing the php double dash version command as you can see my terminal returned a message right here saying that the command php has not been found meaning that i have no php installed on my local machine it's super easy in brew to install packages you need to start off by writing down the keyword brew followed with the action that you want to perform in our case we're going to install something so let's say space install then you need to specify what you want to install once again we're trying to install php right here so let's say space php let's hit enter and this might take a minute as well once again pause the video and i'll see you back once it's done with the new release of 76 php 8.0.2 or higher is required when you want to run your symfony projects there are also some other tools that you need to have installed for symfony such as ctype iconv pcre session simple xml and tokenizer but don't worry this will all be handled once you install php alright as you can see it has been finished and if i scroll up you'll see that right here php has been added with a version of 8.1 now if this hasn't been outputted for you you can simply run php space double dash version and right here you will see that version 8.1.0 has been installed on my local machine now let's say that a new php version comes out in the future and you want to upgrade your php version well that can simply be done through group as well by saying brew upgrade php if i run it right now i'm getting a warning saying that php 8.1.0 has already been installed now the next tool that we need to install is obviously my sequel i'm personally not a huge fan of using php my admin so let's install that through brew as well you simply need to perform the brew command again we're going to install something which is called mysql i'm not going to hit enter since it will overwrite all databases that i currently have so be aware of that since i'm also working on some real life projects i want you to run this command if you have not installed my sql once you have installed my sql you can perform the mysql command to get access to your databases if you have a password on your laptop or pc it will most likely ask for it the first time next to php and mysql we will be using a package manager called composer composer might be weird once you start using it for the first time but once it clicks you will see how incredible it is now you can install composer through brew but since windows and linux need to install it as well we can make use of their official documentation and website so let's navigate back to the browser and let's change the url to getcomposer.org alright and let me zoom in now on the landing screen you'll see their logo it says that it's a dependency manager for php and we have a download button so let's click on it it's simply telling us what we need to do we have these four php lines of codes that we need to run inside the single line but if we scroll down you will see a option right here where you can manually install it personally i'm not a big fan of this since it takes a while so let's scroll up copy these four lines of code navigate back to the cli exit mysql and right here let's command v it and let's hit enter it's telling us that composer 2.1.14 has successfully been installed we're not completely done yet since we need to add composer's system-wide vendor bin directory in our pad it might be something you've never done so let's do it together the path is a system level variable that holds a list of directories you can check it out by echoing out your dollar pad so your variable pad hit enter and this will show a path that you don't need to know out of your head and my pad will probably look different than yours as well and we're not going to use it again we're just going to add our composer right here and then we're done this path is coming from the bashrc file from the root of our operating system if you are located in a different location inside the cli than your route you simply need to perform a cd to change directories to the route once you see the tilde right here you know that you've reached your project root now if we perform an ls right here to show all files that we have you will not see a bashrc file that's happening because a bashrc file is a hidden file which starts with a punctuation mark therefore we need to perform the ls command again but we need to add a flag to it of space dash a to list all files it's alphabetically so let's scroll up to the b section and right here you will see a bash rc file what we need to do is to enter this file which can be done through nano so let's say nano space dot best rc based on the programming language that you have used you will find maybe none one or multiple exports right here what we need to do is creating a new one to export our composer file so let's go right below the last export we had and let's create a new export called pat is equal to double quotes inside the double quotes we're going to add a dollar sign home forward slash dot composer forward slash vendor forward slash bin colon dollar sign pad we need to save and exit this file which can simply be done by pressing down the control x button that's asking us if we want to save it so let's press y and let's hit enter now that was everything we need we will be setting up visual studio code in the next episode but after that we will be starting off building our first symphony project through composer that being said this was everything that we need for symfony if you do like my content and you want to see more leave this video a thumbs up and if you're new to this channel please hit the subscribe button you
Info
Channel: Code With Dary
Views: 146
Rating: undefined out of 5
Keywords: symfony vs laravel, symfony php framework tutorial, create your first page in symfony, symfony php framework for beginners, learn symfony framework step by step, symfony 6 full course, how to setup symfony for beginners, up and running with symfony, learn symfony from scratch, how to create application in symfony, what is symfony framework in php, introduction to symfony, symfony 6 tutorial, symfony 6, installing setting up the symfony framework, symfony for beginners
Id: pd02FjLO6Oo
Channel Id: undefined
Length: 9min 32sec (572 seconds)
Published: Fri Dec 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.