7 ms·
Tons and tons of the web runs on PHP. It is a super easy language to learn and be effective in quickly. Especially if you are talking about open source content
by mooreds 7y ago
Tons and tons of the web runs on PHP. It is a super easy language to learn and be effective in quickly. Especially if you are talking about open source content management systems, PHP is dominant.
Anything that improves overall code quality of this language should be welcomed with open arms. Types, especially if they are backward compatible (as these are) will do so.
I'd be interested in what kind of automated or ide support will be available, but I suppose that won't be known until this is released later this year.
- beberlei 7y agoPHPStorm has excellent support for types and version 2019.2 released last week includes typed properties already: https://www.jetbrains.com/phpstorm/whatsnew/ https://www.jetbrains.com/phpstorm/whatsnew/ Other editors (VSCode for example) can hook into Psalm or Phans Language Server to get type information from these static analyzers. Typing support in PHP Ides is usually excellent.
- gchamonlive 7y agoat 199 USD yearly phpstorm is prohibitively expensive for small teams and independent devs I don't know the state of the language server for newer php versions, but intellisense for vscode is too taxing on the CPU for relatively large projects (20k+ lines of code)
- antisemiotic 7y ago>independent devs Don't they fall under the cheaper individual license?
- tenken 7y agoThis. I use an EDU license for work and buy a personal license for home use, a personal license starts at $83 first year .. I'm on my fifth or so year so it's only $53 yearly ...
- gchamonlive 7y agoI saw no reference to cheaper licenses in the PhpStorm website
- RussianCow 7y agoThe individual license[0] starts at 89 USD a year, and continues to decrease the longer you pay for it[1] (with a 40% discount for the 3rd consecutive year and onward, putting the final price at 53 USD). [0]: https://www.jetbrains.com/phpstorm/buy/#personal?billing=yearly https://www.jetbrains.com/phpstorm/buy/#personal?billing=yea... [1]: https://sales.jetbrains.com/hc/en-gb/articles/206386064-What-is-a-continuity-discount- https://sales.jetbrains.com/hc/en-gb/articles/206386064-What...
- jasonlotito 7y agoYes, it's $89, $71 the 2nd year, and $53 every year after that.
- muglug 7y agoTry Psalm’s language server: https://psalm.dev/docs/running_psalm/language_server/ https://psalm.dev/docs/running_psalm/language_server/ and let me know how it is for you - I use it on its own codebase (160k LOC) and also on Vimeo’s (much bigger)
- gchamonlive 7y agothanks! will try it out
- stephenr 7y ago~2-5 hours gross income per year is nothing for a good tool.
- gchamonlive 7y ago200USD is 1/3 labor month for a regular dev in brazil
- tasuki 7y agoIt's a little rude to assume how much people are earning. I think you might be surprised how little people earn in certain parts of the world.
- colejohnson66 7y agoFor people making minimum wage and programming on the side, that’s actually at least about 20 hours or more
- h1d 7y agoDepends on which country you're from but to me $199/year is nothing for what JetBrains gives me (If you go for individual license, you start from $89 down to third year and onwards $53). In fact I pay for all products pack and am in a good discount beyond the third year, like $13/mo.
- gchamonlive 7y agoyeah, in Brazil that is quite expensive...
- beberlei 7y agoprohibitively expensive? I think you haven't thought this through. Already Chairs, Desk and Rent for every engineer is more expensive than 200 USD every year. Their salary is many hundred times 200 USD. I pay more for coffee and water that they can get for free every year. Independent devs without income can get PHPStorm at much lower rates.
- gchamonlive 7y agocan you tell me how independent devs can access PHPStorm at lower rates? I would love to stop using VSCode. 200USD might be ok for you, but over 800 reais for an IDE is not something I can pay. Notebooks in Brazil are almost three times as expensive as abroad, internet costs are through the roof here as well as living costs... I thought this through, I just have a harder reality than you I guess
- beberlei 7y agoYou can get a free license if you are part of an open-source project: https://www.jetbrains.com/opensource/ https://www.jetbrains.com/opensource/ And if you are an individual, the license is just 89 USD. If you are an individual contractor, then maybe you quality for a startup discount? This also gives you 50%: https://www.jetbrains.com/phpstorm/buy/#personal?billing=yearly https://www.jetbrains.com/phpstorm/buy/#personal?billing=yea...
- gchamonlive 7y agoI completely missed the `For individuals` tab...
- Ayesh 7y agoI can also suggest you to approach JetBrains people if you see them in at a conference. They sponsor many PHP conferences, and open source maintainers (don't have to Linus) can request or open-source license. They also have an Early Access Program that you try out beta releases, and they are free of cost.
- 7y ago
- Lazare 7y ago> at 199 USD yearly phpstorm is prohibitively expensive for small teams and independent devs First, that $200 rate is for teams; independent devs can pay a significantly lower rate (the catch is, you have to pay it personally, not expense it or be reimbursed by an employer). And even for teams, $200 a year is nothing. If you can afford to hire devs in a first world country (US/EU/Aus/etc), you can afford tools for them. NO employer you should possibly consider working for is going to quibble over the license fee; not when they're already paying 1000 times that in fully loaded costs in salary/rent/overheads/benefits/etc. If you can't find $200 for a tool to help you do your job, you're not really a professional. (Again, in a 1st world country.)
- gchamonlive 7y agoyes, I realised my mistake of not seeing the For individuals tab... 89 USD is a little more palatable. The thing I do not agree is that you have to pay for tools in order to be a professional. That is quite elitist. People make careers out of free platforms like Linux so for an IDE is not asking much to have a good tool for free. The community benefits from labor put into developing a free tool.
- Lazare 7y ago> The thing I do not agree is that you have to pay for tools in order to be a professional. Absolutely not! You don't have to pay, and there's tons of free tools which are top rate. What I said is that if you're a professional, you're able to pay for the tools that are worth it. If Phpstorm is worth it (and I think it is, but many devs I respect feel otherwise), $200 is deeply affordable by Western standards. As a professional, you should have a budget for things like software licenses, books, donations to open source projects you really like, etc., whether that comes out of your funds as a consultant, or team's budget, etc. If your employer is too stingy to cover things like Phpstorm licenses...they're not treating you like a professional. (Again, in first world/Western countries. Budgets and pay scales are different in some places!)
- gchamonlive 7y ago
- hn_user2 7y agoCouple interesting things about the Jetbrains licenses. - The yearly cost is purely for updates. Meaning you could just pay one time, get updates for a year and then continue using whatever version you have. - For small teams they offer a 50% discount (less than 10 people, in business less than 5 years) - If this is perhaps an open source project you can get it for free. I got sucked into the Jetbrains family because of just how good their PhpStorm is. Especially in regards to refactoring and debugging tools. I only wish their Javascript tools were anywhere near as good as their Php tools.
- eitland 7y ago> I only wish their Javascript tools were anywhere near as good as their Php tools. I guess this is partially because JavaScript is a much harder language to write good tooling for, but I'm open for other explanations.
- NightlyDev 7y agoThis isn't completely correct. A few years ago JetBrains changed the license. You get the version available when you pay, and then you get a year of updates, which you can only continue using if you renew the license. So you can only use the version available as of the moment you pay for a license.
- Ayesh 7y agoI've come to realize that PHPStorm is _the_ IDE for PHP, after having tested several IDEs (including VSCode).
- kwhat4 7y agoThis statement is pretty much true for all Jet Brains products.
- eropple 7y agoFor the most part, definitely. WebStorm is the only one of their IDEs I'd disagree about, particularly if you're writing TypeScript (which you probably should at least be thinking about doing). VSCode and its language server integration are great.
- noir_lord 7y ago2019.2 fixed a lot of intellij/typescript papercuts for me, vscode still has a slight edge (it's error messages are still better) but the gap is close enough that I haven't had to boot open it in vscode to figure out what the error message means since I started using the RC.
- pjmlp 7y agoI kept hearing this, then Google migrated to InteliJ as basis for Android Studio and I changed my mind about Eclipse (for the better). Most shortcuts are only three keys instead of relying on both hands, files get incrementally compiled on save, just like Netbeans I can use Ant or Maven as the project format, indexing actually stops instead of being done every time application starts, my humble laptop doesn't sound like a propeller plane getting ready for take-off, Javadoc works out of the box without having to dive into settings, no more hunting for problems, easily displayed dynamically without having to trigger manual inspections, ...
- ZeroGravitas 7y agoIs there a document that explores the backwards compatibility of these (and related) changes? Particularly for open source software it's hard to just say "from next version well use 7.4 min" so anything that can be added and fallback gracefully on older versions is handy.
- rossriley 7y agoSo these new features are backwards compatible in that old code that has no typed properties will continue to work. This is a minor release and PHP tends to be almost completely BC even between major release versions so it's unlikely you'll face any issues. If you want to start writing code that uses these features in an existing library then you can branch a new version that depends on PHP 7.4, and define that as the requirement in composer. That way users with older PHP versions will pull older versions of your library.
- TazeTSchnitzel 7y agohttps://php.net/migration5 https://php.net/migration5 https://php.net/migration51 https://php.net/migration51 https://php.net/migration52 https://php.net/migration52 https://php.net/migration53 https://php.net/migration53 https://php.net/migration54 https://php.net/migration54 https://php.net/migration55 https://php.net/migration55 https://php.net/migration56 https://php.net/migration56 https://php.net/migration70 https://php.net/migration70 https://php.net/migration71 https://php.net/migration71 https://php.net/migration72 https://php.net/migration72 https://php.net/migration73 https://php.net/migration73 https://php.net/migration74 https://php.net/migration74 (tbd)
- ZeroGravitas 7y agoThat's kind of the inverse of what I'd like to see. Similar to browser docs what you're often interetested in is the latest things and how far back you can use them, and where they will degrade gracefully further back. Those mostly assume you have old code that you want to make work on new versions, not that you want to write new code that takes advantage of as much new stuff as possible while still working reasonably well on old versions. It's understandable that they would prefer that everyone just upgrade faster, so it's probably not something they want to encourage (both in documentation and in making features degrade gracefully if that requires any tradeoffs.).
- muglug 7y agoYou can see Psalm's support today: https://psalm.dev/r/55e554c1d8 https://psalm.dev/r/55e554c1d8 Psalm supports all the same checks on typed properties that it already does for properties with docblock-defined types, and will make sure all your properties are properly initialised in a class's constructor.
- gchamonlive 7y agoproblem is that a lot of code is written using older PHP versions, and it is not that easy to upgrade from say PHP 7.0 to 7.3. Lots of refactoring deprecations involved (if you want to keep for example debug logs without breaking backend output). I find it hard to trust a language that changes so much between minor versions. If I am wrong please tell me where so I can stop my grief at work and finally upgrade the PHP version we use.
- edgarvaldes 7y ago>it is not that easy to upgrade from say PHP 7.0 to 7.3 Is that true?
- gchamonlive 7y agoeverything has to be upgraded. Older version of composer doesn't work with php 7.3, cakephp must be carefully upgraded. In my tests we even got different query results. So maybe upgrading PHP itself might not be that bad, something I can't tell you for sure, but in my experience nobody uses vanilla PHP, they all wrap it in frameworks, and those must all be carefully upgraded too.
- Lazare 7y agoNo. My employer upgraded from PHP 5.4 to 7.0 with minimal fuss (we spent about a week on the migration, testing, and deployment, and it went smoothly), and 7.0 to 7.3 is trivial in comparison. There are a few edge cases out there of course. Maybe your code base has basically been in stasis since the early days of PHP 5.x, may not even be using composer or namespaces, relies on tons of abandoned or horribly outdated dependencies, doesn't have good test coverage, etc., and then suddenly someone gets a bee in their bonnet about PHP 7.x and wants to upgrade. That's often not going to work out very well, but that's not really a PHP 7.x (or even a PHP thing). :) If you've been maintaining the code, have tests, no ancient vulnerable libraries, using current framework versions, etc, the process is going to be easy. If you're trying a big bang upgrade straight from the medieval period, not so much!
- colejohnson66 7y ago