PHP 7.1 support in PhpStorm 10 - phpstorm

I am using PhpStorm 10.0 but the new php 7.1 syntax is not correctly parsed.
For instance, the following getter is considered invalid syntax:
public function notes(): ?string
{
return $this->notes;
}
Is it possible to make PhpStorm 10.0 php 7.1-aware or do I need to upgrade to the new version?

Is it possible to make PhpStorm 10.0 php 7.1-aware
No.
or do I need to upgrade to the new version?
Yes.
You need at very least 2016.2.2 for such syntax to be supported (latest at the moment is 2017.2.1).
https://stackoverflow.com/a/45483094/783119

Why are you not on PhpStorm 2017.2? You can't expect support for a version of PHP that came after the program was released (and subsequently superceded).
PhpStorm 10 was released in November 2015.
PhpStorm 10 was superceded by PhpStorm 2016.1 in March 2016
PHP 7.1 was released December 2016.

Related

PHP Language level missing latest (version 7.3 is the highest)

I'm trying to setup Xdebug and while doing that I'm trying to ensure that all PHP-versions and setup of that is exactly right.
I've matched the PHP-version on the server (7.4), by installing and linking the right PHP-version using Brew (I'm on a Mac).
So in a terminal, if I write php --version I get: version: 7.4.14:
I've set the CLI-interpreter in PhpStorm to point to that same PHP-executable:
But in spite of this, I can only set PHP version 7.3 to be the highest language level:
Solution attempts:
All these things have been found in random cracks and articles. None of them worked.
Invalidated Cached and restarted PhpStorm ( File >> Invalidate Cache and restart ).
Uncheck 'Synchronize IDE Settings with composer.json' in Settings >> Languages & Frameworks >> PHP >> Composer. I had to first insert a path to remove it. But it didn't do anything anyway.
Tried to see if there was any upgrades to the "PHP Latest"-plugin, but I couldn't see any pending updates (v. 0.4).
Overarching question
How do I get the latest version in the PHP Language Level field (to also get better code hints)?
My version was this: 2018.2.3 - Build #PS-182.4323.68 built September 13, 2018
You need to upgrade your IDE. Latest stable version is 2020.3.1.
Partial PHP 7.4 support is present since PhpStorm 2019.2 version.
Proper PHP 7.4 support was added in PhpStorm 2019.3.
Initial/partial PHP 8 support was added in PhpStorm 2020.2.
Current 2020.3 version has more complete PHP 8 support.

How to update to PhpStorm 2018

I am quite new with Ubuntu and I am using PhpStorm for writing code.
Can you please tell me how to update it from 2017.3.4 to 2018.1 without losing setup?
the latest official version of phpstorm is Version 2017.3.6.
Version 2018 is only a preview. You can download the preview here: https://www.jetbrains.com/phpstorm/download/download-thanks.html?type=eap&platform=linux

Can SonarLint be run on JDK 5,6, or 7?

I am trying to install SonarLint for Eclipse Ganymede (3.4.2) - and our project is very old, so we're using JDK 1.5 here. So is it possible to run SonarLint for JDK 5?
First of all, JDK 5 is so old, I can't really be certain of anything...
But here are some key factors that are important to understand:
Java code is analyzed by the Java analyzer (known today as "SonarJava"). SonarLint is a plugin in Eclipse (and other IDEs) that executes the SonarJava, and uses the results from it to annotate the code you are editing.
The JDK version that the SonarJava itself requires to run, is not the same thing as the JDK version of the source code it is able to analyze (= the subject of the analysis). For example, SonarJava may not run at all on JDK 7, but able to analyze code that is written in JDK 6.
If you use SonarLint in standalone mode, it uses its embedded version of the SonarJava, you cannot use another version. If you use SonarLint in connected mode, it uses SonarJava installed in the SonarQube to which you are connected. Here you have some freedom of choice in the version of the SonarJava, but not unlimited, because SonarLint may not be compatible with all versions of SonarJava, for example recent versions require a certain minimum version.
As per the product news, the current version of SonarLint requires Java 8 and more recent Eclipse than Juno. But you may be able to find an older version of SonarLint that can run in an older Eclipse, and support a version of SonarJava that is able to run on your JDK, and analyze code written for your target JDK version.
Based on the above points, you can dig into the older releases of SonarLint and find something suitable. These links should be useful in your search:
Product news of SonarLint for Eclipse. These also include links to the detailed release notes, which usually contain information about the version of embedded SonarJava
Releases of SonarLint for Eclipse
Homepage of SonarJava

ChromeDriver 2.31 not working in CentOS / RHEL 7 (gilbc 2.18 required)

When trying to use ChromeDriver 2.31 in CentOS 7 I get the following error:
version 'GLIBC_2.18' not found
ChromeDriver developers confirm that glibc library dependency has been promoted to 2.18, while CentOS 7 has version 2.17.
Related links:
Announcing ChromeDriver 2.31
ChromeDriver Issue #1894
ChromeDriver Issue #1772
Is there a way to make it work without switching to another OS?
The Chromium developers are aware of the issue and working on a fix:
glibc dependency creeped up to 2.18 in M61, breaking EL7 support
During the switch to libc++, they accidentally referenced a new symbol from the glibc version in their sysroot, __cxa_thread_atexit_impl. But this was only introduce in glibc 2.18, and Red Hat Enterprise Linux 7 only has version 2.17. Apparently, for their use cases, libc++ works well enough without this symbol (similar to libstdc++ from GCC), so they just need to tweak their build not to use it, and Chromium (and thus Chrome Driver and Chrome unstable) should work again soon.
As an end user or even software developer who cannot rebuild the software in question (or maybe just does not want to invest such a non-trivial effort), there is little one can do about such glibc version dependencies. Therefore, it is pretty much a requirement that all builds happen against a build environment which matches the oldest operating system version one wants to support.
Dependency to GLIBC 2.18 have been removed in Chromedriver 2.32, so that version is safe to use on Centos 7.
Back to chromedriver 2.30 and it work with google-chrome-stable.x86_64 0:60.0.3112.113-1 on CentOS 7

PhpStorm showing code error for PHP method

I am curious as to why the following syntax is rejected by my PhpStorm editor:
PhpStorm version: 2016.1.2
Nullable parameters/return types (?User from your example) is a PHP 7.1 feature.
PHP Language Level must be set to 7.1 in PhpStorm settings for this project (although right now it does not produce an error if language is set below 7.1 -- see WI-32136 ticket).
Support for nullable types was added in PhpStorm 2016.2.2 (which is newer than your 2016.1.x)
Conclusion: upgrade your PhpStorm to the latest version (which is 2017.2.1 at this moment). At very least you need to have PhpStorm 2016.2.2 for this particular syntax to be supported 9not showing an error).