Jacob Bennett: Hi everyone, welcome back to [00:00:30] the Laravel News Podcast, today we are going to be talking first of all about F-Bar. So F-Bar was something that we talked about two weeks ago, right?
Michael Dyrynda: Yeah.
Jacob Bennett: And it has since been released. So F-Bar uses the new Forge API to connect to your boxes, to show you all the information about them, including what sites are on them. It will allow you to SSH directly into your box straight from your toolbar up at the top of your Mac. And I’ve been using it for the last week or so and have been really liking [00:01:00] it. Have you got a chance to use it yet, Michael?
Michael Dyrynda: I haven’t used it personally. We don’t really use Forge at work because we’ve got a lot of our own infrastructure, so it doesn’t provide me with too much use, but I would like to install it just to play around with it.
Jacob Bennett: Yeah, it’s pretty cool. I think one of the things that has been most helpful for me is to be able to quickly see which sites are on which boxes.
Michael Dyrynda: Yeah.
Jacob Bennett: So I have, let’s see, one, two, three, four, five, I have five boxes here. And I’m trying to remember which ones [00:01:30] belong to which sites can be a little bit frustrating. And so, anyway, this last week I reached out to, you are gonna have to help me with his name. Do you remember his name?
Michael Dyrynda: Jan.
Jacob Bennett: Jan, yeah. I reached out to Jan and just thanked him and said, “Hey, thanks so much for making this, this has been really great to use.” And I asked him if he’d be interested in giving away some licenses for our wonderful listeners. So indeed he gave me five and we are going to be dropping those codes throughout the show, so these are coupon codes [00:02:00] that you can use to get a free copy of F-Bar for yourself, which again I would highly recommend. So we are going to be dropping a couple of those throughout the show, so make sure you listen to the entire show, and in fact we are going to give you one right now.
Michael Dyrynda: All right, this is a one-time code that you can enter during the checkout process, it will give you 100% discount. So pens at the ready, 715698B1.
Jacob Bennett: There you [00:02:30] have it folks a free copy of F-Bar just for you. Thank you so much, Jan, for doing that. And let us know what you think for those lucky ones of you who are fast at your keyboard, let us know what you think, and hopefully you really enjoy it. Let’s see what else we have here. So why don’t we talk a little bit above the medium publication that Taylor kind of announced this last week on Twitter?
Michael Dyrynda: Yeah. So it was just in my day-to-day scrolling of Twitter I saw that Taylor had tweeted that [00:03:00] releases of Laravel projects and any products, so anything around the Laravel application and framework itself, around Spark, around Lumen. Even things like Forge and Envoyer. There is now an official announcement publication that has been setup on medium.com, so we will link it up in the show now, but its medium.com/laravel-announcements. And you can basically follow along there and keep up-to-date with any of the new features that are coming up, [00:03:30] any new changes and things like that.
So it’s probably easier than trying to keep tabs on everything on Twitter. I think that there is a lot of noise on Twitter and it’s hard sometimes to keep up with everything. So this is the kind of thing that you can just fire up in your browser and look at as and when need to. It’s got RSS being part of Medium, and you can also filter the RSS feed by tags, so if you only want to track the Laravel framework releases themselves, you can narrow it down using the filters there.
Jacob Bennett: [00:04:00] Yeah, this is nice because it covers Laravel, Lumen, Spark, some of the core packages like maybe something like Passport or Cashier or something like that. So this is a great publication to be following. If you haven’t used Medium before, check it out, it’s really pretty neat.
Michael Dyrynda: Definitely.
Jacob Bennett: Taylor had also said this last, I think it was maybe even just yesterday, he was talking above the upgrade path from 5.4 to 5.5. And it’s not really the updates path and the paths has been super, super difficult, but he had said [00:04:30] that he is really aiming to make 5.4 to 5.5 the easiest upgrade that he has ever made. So I’m wondering how exactly that’s gonna happen. I’m supposing and one of the people who were commenting basically said that that becomes easier to do as you kind of cement your viewpoint, right? And so this is the fifth release for Laravel 5. I’m not sure that Laravel has had any point releases that have gone above 3 in the past.
Michael Dyrynda: Yeah, I think from memory [00:05:00] 4.3 was gonna come out, but the changes were significant enough that Taylor opted to skip directly to 5. So yeah, 5.4 and now 5.5 which would be around July, around Laracon time I think Taylor said he was targeting for. Yeah, would certainly be the longest we stuck on particular revision number, I guess.
Jacob Bennett: Yeah, exactly. I’m kind of glad about that. I really liked the folder structure, which sounds silly.
Michael Dyrynda: Yeah.
Jacob Bennett: But that’s one of the biggest things [00:05:30] that changes between these, these massive releases like from 4 to 5, was the folder structure changed completely. And I’m really enjoying how it is, and so I like to keep that the same, but give me all the new features. That’s awesome.
Michael Dyrynda: Yeah.
Jacob Bennett: One of the things in 5.5 that I’m looking forward to as well that was just put out this last week and is on Laravel news as well is vendor publish. So it’s actually just some options really for vendor publish. So if you’ve ever developed a package and you have assets that go along with that package, [00:06:00] so maybe there is a couple of views or maybe there is some CSS or things like that that go along with the package, you’ll have to ask the people who are installing it to go ahead and run from there, command line PHP artisan vendor publish.
And in the past what that had done is it would kind of indiscriminately, regardless of which package you are really interested in, publishing all the assets for, it would go ahead and publish all of them. So, for instance, like I know there is a package that Laracasts maintains that is an alert package. [00:06:30] It puts like an alert at the top of your screen and you can pass something really easily through a controller, I think it’s called Flash. So you flash colon colon and then you pass-through info, and that you put an info in whatever, it will display info alert at the top of your page and bootstrap.
So you could use those, if you could use his views if you wanted to, but you could also have your own. So in the past I would have my own views, and then if I needed to install a package that had to publish its assets, it would end up overwriting [00:07:00] all of the views that I had made because it would publish the assets for Jeffrey Way’s package as well. So in this new vendor publish, you have the ability to filter down really easily to the package that you want. And I think even maybe in the versions that we have now you can do it, but you have to specify the entire service provider and it’s kind of fraught with errors and headaches.
Michael Dyrynda: Yeah.
Jacob Bennett: So with this you can pass at nothing, you just pressed enter and I think it’ll allow you to almost do sort of [00:07:30] like an autocomplete. So I’m looking forward to that, it’s pretty cool.
Michael Dyrynda: Yeah. It will certainly make things easier, especially when you think you know what the service provider is that you need to enter, and I inevitably make a mistake when I do that. So it’d be nice to have that that reference where you just have to pick a number from zero through however many you have, and the artisan command will sort the rest out for you.
Jacob Bennett: Right, so you type ‘PHP artisan’ and then you type ‘vendor publish’ and then press enter and it will just list them up, and then you just select [00:08:00] 21, so pretty neat. Speaking of that one thing that I’ve actually been using over the last six months maybe is if you’ve ever used ZSH.
Michael Dyrynda: Yeah.
Jacob Bennett: Which is kind of like an autocompleting thing for your command line. I have an Artisan autocompleter, which is pretty cool. Have you ever used that?
Michael Dyrynda: I think I have it installed being as when I tab along in my browser, in my terminal. It does autocomplete for me.
Jacob Bennett: Which is really handy for any of you who use ZSH and are not aware of this, you should [00:08:30] definitely install that. It makes it really handy, especially even works if you have your own local commands that you’ve written. So for me I kind of namespace all of my commands, so if I’m on an app called Check-In, it’ll be Check-In colon whatever, what my name space [inaudible 00:08:46]. But a lot of times they’ll forget what they are, so you just type Check-In tab and it will show you all the ones that you have available and then you can kind of tab to it and use it from there. So yeah, autocomplete for ZSH, for PHP Artisan, check that out.
Michael Dyrynda: Yeah, in the show notes, it’s for sure.
Jacob Bennett: [00:09:00] Yeah, we’ll link that up in the show-notes as well.
Michael Dyrynda: So another thing that happened in the last couple of weeks was Laravel Live India. And it’s great to see how much the community is expanding the world over behind Laravel not just online, but we are starting to see more of these sort of live events pop up, these conferences outside of the regular Laracon US and EU.
So Laravel Live India was a brand-new conference that was held for the first time in New Delhi [00:09:30] this past March, the 19th. And we had some familiar faces speaking, there was and Marcel, and you have to excuse me because I’m really not sure how to pronounce his last name, but its Marcel Pociot and also a friend of the podcast, Freek Van der Herten.
Jacob Bennett: Spoke.
Michael Dyrynda: And a few other speakers, I’m sorry I’m not familiar with you, but I’m sure their talks were great. So this was a single day event that played out in front of audience of about [00:10:00] 200 people, and the organizers said that their goal was to bring together bright minds to gives talks that are idea focused and on a broad range of subject in both PHP and Laravel to foster learning inspiration and provoke conversations that matter.
Jacob Bennett: Yeah, I’m sure that had to be awesome for Taylor to see this stuff.
Michael Dyrynda: Yeah.
Jacob Bennett: I saw him re-Tweet it, and that’s got to feel really cool to be the guy that is responsible for … I mean, not responsible ultimately, right, for organizing this …
Michael Dyrynda: Sure.
Jacob Bennett: But the framework that they are using. That’s really, really cool. I know that he said like one [00:10:30] of the things that’s really fun for him going to conferences is when people come up to him and say, “I was able to quit my full-time job and kind of start a side business and do that as my full-time thing because of Laravel.” And so I can imagine that this would be really any different, being able to see your framework used kind of across the globe, that’s going to be a pretty cool [crosstalk 00:10:48].
Michael Dyrynda: Yeah. It’s definitely changing, maybe not, it’s not life-changing. I guess it could be depending on how you look at it, but it’s certainly having an impact. And that’s not something that anybody can do. [00:11:00] It’s really cool to say it.
Jacob Bennett: Yeah, for sure. Speaking of conferences we actually had the Laracon online conference feedback published on the Laravel News site. So if you are one of the ones who attended the conference, you got a link at the end of the conference to go ahead and give some feedback on what you thought. So there was basically a 1 to 10 scale and then a free response section.
And so they published what the results were of that, and it looked like 75% of people chose [00:11:30] I think 9 or above, which is really good. It’s really good, I mean, 9 and above, that’s they actually classified these different types of people, and those people would be considered promoters. So these are the people who are going to tell their friends about the Laracon online conference, they are gonna be the people who were on Twitter saying, “Hey, this was awesome, go check out this talk.”
Of course, Eric mentions in the article here, he says, “One of the things that stuck out to him is how impossible it is to please everyone.” Right, and you’re always gonna have that. I [00:12:00] think he said that out of the 500 some people that took it, there was 115 people who were kind of like indifferent, like passive, and then there were others who were detractors, which you’ll have that, right. There is no way to please everybody.
Michael Dyrynda: Yeah.
Jacob Bennett: If you’ve ever done something out in the open, and you’ve basically opened yourself up for criticism, you are gonna get some. It’s just the way that it is. So overall everything went really well, and everybody had lots of great feedback. So that’s really exciting. I think that Laracon Online next year will [00:12:30] probably just get bigger.
Michael Dyrynda: Absolutely, especially now that they’ve got a year to prepare for it instead of the six weeks. That realistically they did a really, really good job of getting it done in six weeks.
Jacob Bennett: Yeah. Okay, code number two for F-Bar, here it is. Everybody get your pens ready, C427C235, there you go, another happy winner of F-Bar. Let’s go ahead and talk about some other happenings that are kind of going on in the community. This last week [00:13:00] we had some outages with DNS stuff you’ve been to. Michael, do you want to talk about that a little bit.
Michael Dyrynda: Yeah. So it’s interesting, I was actually speaking with Eric Barnes the night before it’s sort of like hit I guess. And he was asking me, “What do I do about this error message? Where did it come from?” And I said, “It sounds like something DNS related, try this and try that and see what happens.” As it turns out there was a security release [00:13:30] or a security patch that Canonical did, the people behind the Ubuntu operating system had released as a critical security vulnerability.
So anyone who is using a Forge based server would likely have been affected by these if they were doing any kind of API requests to third-party services. And basically what had happened because you were using a Forge server because automated security updates [00:14:00] were installed, this security patch could’ve come through. Now the problem was that PHP-FPM, which is what’s used to sort of interface between the PHP language and your web server choice isn’t actually listed I believe, was one of the services that needs to be restarted when this particular update was rolled out.
So what happened was after DNS had timed out, the request was made, I had to go and look up the IP address that failed [00:14:30] because the underlying DNS resolver had been changed in some way. And so that’s where heaps of people started running into issues. So unfortunately it was a bit hit and miss, no one really knew what had happened. The report was on the Ubuntu website, but it was kind of, it went very much into the specifics around what went wrong, and why they were fixing it and that kind of thing, but it didn’t really sort of talk much about [00:15:00] how that might have widespread effects.
So a long story short, people having issues, no one was like, “Well, we don’t know anything about this.” And DigitalOcean was saying the same sort of thing and then, I’m sure Taylor had a terrible day because …
Jacob Bennett: And he was in Texas, wasn’t he?
Michael Dyrynda: Yeah, I’m pretty sure he was away, I saw some photos of [crosstalk 00:15:22].
Jacob Bennett: Yeah, he was on vacation or something, of course.
Michael Dyrynda: Yeah.
Jacob Bennett: Yeah, of course like this happens while you are out of state.
Michael Dyrynda: Yeah, [00:15:30] you are away from everything and suddenly Forge is having issues and Envoyer is having issues and whatever else there, problems around and then everyone who is deploying servers with Forge is having issues. And Taylor is obviously on vacation trying to sort this stuff out. It seemed like he got quite flustered with it and then he got quite flustered with people making alternative suggestions on different operating systems to use.
Jacob Bennett: What was the other one they were suggesting, they [crosstalk 00:15:55] suggesting?
Michael Dyrynda: A lot of people were suggesting Debian, but then people were suggesting CentOS and RedHat, [00:16:00] everyone threw their hat into the ring.
Jacob Bennett: Yeah, I think he said, at one point he said, “If anybody, the next person that suggests Debian is getting blocked.” He is like, “If one more person [crosstalk 00:16:10] use Debian.”
Michael Dyrynda: That's right.
Jacob Bennett: Yeah, it’s pretty funny.
Michael Dyrynda: I mean eventually everyone figured out what went wrong, and ultimately it came down to just restarting in FPM, which you can do through the Forge interface, which is nice.
Jacob Bennett: Were you able to do that through the Forge interface because of the stuff or did you actually had to [crosstalk 00:16:27]?
Michael Dyrynda: No, actually I think I saw someone had tweeted [00:16:30] that you could do it, but it was failing silently, and that Forge wasn’t picking up, so you actually had to SSH into the server to restart it.
Jacob Bennett: Yeah.
Michael Dyrynda: So that was not a problem if you’ve got multiple servers, then you are gonna have issues there, but the real kicker was that after everyone had sort of smooth the rollout and was back on track, Ubuntu decided to put out another security patch the very next day to roll back the change that had caused so many issues the day before. [00:17:00] And guess what, it still wasn’t flagging that FPM had to be restarted so.
Jacob Bennett: Oh my gosh. Are you serious?
Michael Dyrynda: All those issues came up again the next day so. Look, I can’t remember the last time that I experienced this kind of issue with Ubuntu. It’s like these things happen, we all have issues from time to time granted we probably don’t create issues at this biggest scale. [00:17:30] Ultimately they were trying to do the right thing, it’s hard to say.
Jacob Bennett: Sure.
Michael Dyrynda: Obviously they can’t account for every single configuration on every single server. So I’m sure we’ll all forget about it in a little while, and everything we’d just continue as it was before I guess.
Jacob Bennett: That had to be pretty frustrating though for people who are expecting to be able to re … So, okay, the solution is restart again, great. They go [00:18:00] into Forge and they go to restart it. And it’s like, “Okay, it looks like it restarted,” but obviously Taylor’s stuff was having the same problems that everybody else’s stuff was, right?
Michael Dyrynda: Yeah.
Jacob Bennett: So it’s, so failing silently and now you’ve got people who are probably doubly frustrated because they are like, “It’s still not working. I restarted, why isn’t it working?” No, I didn’t actually start restart the SSH in.
Michael Dyrynda: Yeah.
Jacob Bennett: Speaking of that, I kind of have a little bit of a weird scenario, so this one thing that I’ve noted with F-Bar is that if you are managing … And this is again, this [00:18:30] is a really weird use case, but I’m just gonna mention it real quick. If you have a box that’s inside your building that you’ve provisioned using Forge, so you can kind of have a box inside your building.
You can poke a hole in your firewall and say, “Hey, Forge, you can talk to my box only through your IP.” What you have to do to SSH into that box that’s in your building is actually use its local IP. And so when you go to your, open in your terminal and SSH into it from F-Bar, obviously it only [00:19:00] looks at the external IP and tries to SSH the external IP of the box that you are using.
Michael Dyrynda: [crosstalk 00:19:05].
Jacob Bennett: So it’s not really limitation, it’s just kind of a weird glitch. I’m sure that’s like, I’m probably one of the very few people who has that problem. And I don't know if I mentioned it before or not, but one of the top requests has been the use of multiple API keys. So talk to the creator and he said that has been really, really asked for, and so it’s gonna be coming soon, he said. So [00:19:30] that’s good. So if you have multiple Forge accounts that you kind of help manage, you’ll be able to push both API keys in here and get all the boxes. So it’s pretty helpful. Yeah.
Michael Dyrynda: That is indeed.
Jacob Bennett: There was another article that came out of Laravel News this week that was using variables in your .env file. So everybody should hopefully be familiar with a .env file and what this typically does is allows you to keep things that are sensitive out of your source code. So you don’t want to be committing [00:20:00] your AWS keys or your credentials for using MailChimp or whatever it might be.
You don’t want those to be in your code because if there was a possibility that it got out, if you accidentally made your private repo on GitHub not private for two seconds and now it’s cached out there, then people could get those keys and obviously abuse them. So your .env file allows you to take those pieces of critical sensitive information and move them out into a file that does not get committed to your repo.
So that’s what the .env [00:20:30] file accomplishes. However, it’s pretty much just a dump text file. It is really what it comes down to, right. You define a variable, name essentially, so like mail_username, and then you say equals and then you put in what the username would be. So that’s kind of just how it’s been, but apparently while digging through the package that Laravel uses to kind of managed these .env files, I think I was talking to Matt Stauffer, he had found it and then somebody else had tweeted about it.
But basically you can declare variables in here, so you can [00:21:00] reuse pieces of information throughout your .env file. So one of the things that they give as an example is, for instance, if you were using mail username and your mail from address was the same, what you can do is you can reference one of your previously set variables by just putting dollar sign in brackets and then using the key of that env setting, right. So you could have mail from address equals dollar sign bracket mail username, end of bracket.
Michael Dyrynda: Yeah.
Jacob Bennett: So the thing that this [00:21:30] seemed possible, useful to me for is if you have a couple different configurations that I’ll need maybe like an AWS credential like, so maybe you have an IAM user setup and on AWS, and you need that to be set in a couple of different env’s once that are having to copy and paste that around, you can set it once at the top and then you can reference it in your env in a couple of different places. So it seemed like it could be useful, and I think I’ll take a look [00:22:00] at using that in the near future here.
Michael Dyrynda: Yeah. The other thing that Taylor had tweeted about I think just yesterday which probably doesn’t mean a lot to people listening to this when we actually release the episode, but he was talking about a one-click sort of upgrade within Laravel Forge again to change or to upgrade your PHP from version 7.0 to version 7.1. So that should be out on Monday, the 27th of March. That’s [00:22:30] the day we have currently.
Jacob Bennett: I would have used that twice already.
Michael Dyrynda: Yeah.
Jacob Bennett: That it would be super-handy.
Michael Dyrynda: Yeah, it annoys me when I log into Forge and I say that I’ve got two servers, and one of them is on 7.1 and the other one is still running 7.0 so.
Jacob Bennett: Yes, that is [crosstalk 00:22:45].
Michael Dyrynda: And I don't really want to futz around with it doing it manually or anything like that. So we just leap it until this is available, and then go from there.
Jacob Bennett: That’s what we ended up doing too is we didn’t want to mess with the … we just created a new box and [00:23:00] started putting new stuff on, then move to a couple of other things over. But now we’ll just be able to click a button and see it update, which is, man, that’s really handy.
Michael Dyrynda: Absolutely. The other thing that was announced as part of that upgrade announcement was that there will be automatic optimization of OpCache or OpCache, depending on which part of the world you come from I guess. So OpCache is something that has been shipping with PHP since version 5.5, and [00:23:30] what it essentially does is stores precompiled script in memory. So essentially what it does is each time a PHP script is compiled for the first time, it’s stored in memory, and it’s basically referenced again any time it’s needed as opposed to every time you load it.
So this helps to speed up the loading of your application once those pages have been loaded for the first time, so they obviously don’t have to recompile that code each time. So that is something [00:24:00] that I don’t know the specifics of. There wasn’t much detail around what the optimizations will be, but I’m sure once that’s available in Forge we’ll have some more information on Laravel News.
Jacob Bennett: So is OpCache something that you have to enable specifically on your box? Does it should be default with Forge with the Forge provisioned box, do you have any idea?
Michael Dyrynda: I believe it is enabled by default. Yeah, it is enabled by default since version 5.5.
Jacob Bennett: Yeah, I wasn’t … I had forgotten [00:24:30] the name for what OpCache was, I knew what it was when you started talking about it, but that’s pretty neat that it’s enabled by default. And if you’ve got PHP 7 and you’ve got OpCache, you’ve got a lot more speed than you did even just a couple of years ago, so it’s awesome.
Michael Dyrynda: Yeah. I was gonna say, while we are talking about Forge and having just spoken about F-Bar again, maybe we could giveaway another one of these F-Bar codes.
Jacob Bennett: Go for it.
Michael Dyrynda: All right, pens. EC3FBB43.
Jacob Bennett: [00:25:00] Awesome. So if you like me are not a hater of PhpStorm and are instead a lover of PhpStorm, you are in for some good news because PhpStorm 2017.1 was just released. And actually there was a couple of reasons I knew about it. One of the reasons was because this week I was trying to get Emojis in my PHP code, which sounds a little bit silly, right. The only examples you ever see of that are the ones where people make like [00:25:30] the Poop Emoji equal to it as something instead as a variable, and then sprinkle it throughout their entire class. That was not the point of what I was trying to do.
I actually was trying to use in Emoji as the beginning of a subject line. So in Outlook you can now do that, so there is support for Emojis in Outlook subject lines, which is pretty handy, and we had something at work where I basically wanted to be able to set statically fill in for this people. Here is the Emoji at the beginning of the subject line, so it was really kind of a pain to get that in [00:26:00] PhpStorm, so I tweeted out to Fariq and said, “Hey, is there any way because I know he is a big PhpStorm user. I said, “Is there any way to get Emoji support in PhpStorm?” He said, “No, there is not. So you’ll have to use my package.”
Of course, he has a package for it. So he has an Emoji package, which allows you to easily pull in Emoji unicode stuff. But then somebody tweeted him and said, “Actually if you go to the basically the bleeding edge version of PhpStorm, the early access program, it has Emoji support.” So I tried [00:26:30] that out, and sure enough it did. So I had already done the code and committed it and pushed it up, so I just forget it. And then the next day, of course, on Laravel News I see 2017.1 is out, and what do you know, it has Emoji support. So that’s the only feature, that’s it everybody, that’s all I wanted. No, I’m just kidding.
There is actually a ton, a ton of new things, I’m kind of gonna go down the list here and hit the highlights. First up was support for PHPUnit 6, so PHPUnit 6 has been released recently and you’ve got autocompleting and things like that based on the PHPUnit [00:27:00] 6 methods. There is improved support for Laravel blade, so it will do autocompletion and it includes now the at include when directive, the at component directive, the at slot directive. There are parameter hints which I’m not actually a huge fan of.
Basically what this allows you to do is if a method type hints null, or no, maybe not type hints null, but it’s set to null by default, you don’t necessarily know what it is. So when you are typing out the arguments, [00:27:30] it will actually say this is a variable called search, this is a variable called replace, just so you can easily know, “Oh, that’s what that argument is looking for. I need to go ahead and type in what I’m searching and what I’m replacing here.
I didn’t find it overly helpful, it was actually really confusing when I first upgraded. I saw these little and they are really ugly by default too actually. So I disabled that out-of-the-box, but maybe that’s something that’s helpful to you [inaudible 00:27:53]. It has a recognition of PHP class names in strings. So if you’ve been [00:28:00] using Laravel for a long time, and you’ve got old projects in your service providers lists, so in your app.PHP, it used to be that all of the service providers were listed just as a fully qualified namespace in the string.
And since then we’ve actually swapped that out to have the class name and then dot dot or colon colon class. In the PhpStorm you can command, click on those classes and it will take you directly to that location. That was not the case if you used a string to use the fully qualified namespace, but now it will do that, it will go ahead and recognize [00:28:30] those class names in strings, and so you can quickly get to those, which is pretty handy.
There is improved PHP formatting, so again if you’ve gone through Jeffrey Way’s setup of PhpStorm, I think it is like Making PhpStorm Awesome, I think is what it’s called. On my keyboard its command Alt L, and you can set up a bunch of formatting rules for your PHP and say, for instance, I want to have a space after an if statement, or I want to always use single quotes instead of double quotes. There is a couple [00:29:00] of new options that you can configure here like placing parens after a constructor or converting else/if statements. So those have been added.
Another one that’s actually really handy that I’ve found looking through the changes here is there is a quick fix for undefined variables. So let’s see that you are using an anonymous function and you are let’s say using a collection of pipeline, you have to use an anonymous function and you are using a variable, but you forgot to put that variable in a user statement with that anonymous function. Does that make sense?
[00:29:30] Yeah, so if you did that, if you are referencing a variable that’s outside of the scope of that closure, you can just do a quick fix on it and it will add to the user statement there on the end of that anonymous function, which is pretty handy. Oh, it also now ships with Vue.js support, so you don’t have to install it separately, it is now built-in.
So it seems like this is really, I think that maybe PhpStorm has gotten some love from the Laravel community, and so it’s kind of tailoring itself a little bit. No pun intended, tailoring itself [00:30:00] very nice. So it’s got blade support, Vue.js support, shipping with these things, which is really nice. So you don’t have to pull them in separately.
One of the thing that was kind of interesting that I noted was that they actually have completion from modules in your package.json. So package.json is where everything kind of saves to when you do NPM, install, let’s say Laravel mix. So if you are in your package.json, you can start to type in a package name and it will actually make [00:30:30] suggestions for you on a lot of the ones that are commonly used like lodash request, async_express, those sorts of things. If you are trying to type those in in your package.json it will actually suggest them for you, and then it will grab the latest version and description for you and show those and inject it into your package.json. So just little helpers there.
There is a couple different things with version control and search and find and path that have been improved, but overall it looks to be a really great release. [00:31:00] I’ve already updated, I’ve been using it, and of course you also have Emoji support. So if for nothing else, if for no other reason you should be upgrading to PhpStorm 2017.1 for that reason alone.
Michael Dyrynda: I just like to point out that sublime text has had Emoji support for a long time.
Jacob Bennett: I know, I was actually using sublime kind of instead of PhpStorm for this one little thing, I was like, “Forget it, I’ll just use some sublime text.” So I love sublime text, it’s great, I just like PhpStorm better [00:31:30] most of the time.
Michael Dyrynda: I did. I did actually consider having a poke around with PhpStorm again, now that there is a new version out. It looks like there is some cool things in there worth using. I do like that they’ve got current scope highlighting, so you can see if you are on an, if … Yeah, so you can navigate between matching pairs of if statements or HTML itself, I don't know how long that’s been in there otherwise, but kind of handy.
It’s always annoying when you know you’ve got some [00:32:00] statement or some usually HTML. Heaven forbid that you have an if statement that expands more than one screen, that when you’ve got some HTML and you are try to figure out if you’ve closed the tag or something and you are scrolling up to see where everything matches up, it can be a bit tedious at times.
Jacob Bennett: Yeah. Also if you follow Adam Wathan, you have probably seen or maybe not, he has a nice little package that he has developed that allows you to very, very quickly run your [00:32:30] tests for a specific file that you have open. So if you’ve seen his talks and things like that, you’ll notice that he is in a class or in a test and he saves it and it’s kind of already running before he gets to his terminal. Have you ever noticed that?
Yeah, so he kind of develops a package and I think David Hemphill helped him with that to be able to either run an entire test or to just run a single test within one of your test files. And actually PhpStorm has that [00:33:00] as well now. So there is a article out there Adam had tweeted somebody asking if they knew how to do that in PhpStorm, and one of the guys on the team actually wrote up an article on how you can do that in PhpStorm.
Michael Dyrynda: Great.
Jacob Bennett: It’s not as good as Adam’s yet. I think you actually have to go over and right-click on the test file and say like run this method or only run this test, which doesn’t seem great. There may be a way to setup a shortcut for it. I only briefly tested it, I think I just find it about it on Thursday [00:33:30] and I just kind of tried it out real quick. It did seem to work, it did not seem as good as the sublime kind of way of doing it, but it’s out there. So I’m sure if we get enough push on it, they will make it, so you can do it really easily from a keyboard shortcut.
Michael Dyrynda: Very good.
Jacob Bennett: So there we are, PhpStorm for the win.
Michael Dyrynda: Very good.
Jacob Bennett: I think that about wraps it up for this week. Thank you so much for listening to the episode this week. This is episode 34, so you can find the show notes for this episode at [00:34:00] laravel-news.com/podcast/34. If you liked the episode, please feel free to rate it up in iTunes or your podcatcher of choice. Five stars is always very much appreciated. If you have any questions for us, please reach out to us on Twitter at Laravel News or on our personal Twitter handles, we would love to hear a question that you have that you’d love answered on the show. Michael, until next time my child.
Michael Dyrynda: [inaudible 00:34:23] [00:34:30] .
Jacob Bennett: And the last code.
Michael Dyrynda: 84DAC989.
Jacob Bennett: Enjoy.