Comments (8)
Can confirm this bug. Happened right after I updated to PHP 8.
I fixed this in this way:
Open JsonMapper.php (I use Archlinux):
$HOME/.atom/packages/ide-php/vendor/netresearch/jsonmapper/src/JsonMapper.php
And change this on line 300:
// Turn this...
if ($type !== '' && $type{0} != '\\') {
// Into this...
if ($type !== '' && $type[0] != '\\') {
Restart Atom and the error is gone. For me worked. I hope this help you.
Edit:
Only remember of change things properly later, like @donaldinou say above (via composer update).
from ide-php.
Related to the package netresearch/jsonmapper
as a dependency from felixfbecker/language-server
.
It is required as follow: "netresearch/jsonmapper": "^1.0"
.
Regarding to the composer.lock it has been released with the v1.4.0 but many fixes on 1.x branch exists now (last release is 1.6.0)
So the solution is to do a composer update
or force >=1.6.0 on the root package and then composer install
.
Finally, republish the plugin.
Related to the pull request:
#158
from ide-php.
from ide-php.
Can confirm this bug. Happened right after I updated to PHP 8.
from ide-php.
Can confirm this bug. Happened right after I updated to PHP 8.
You can fix this way but you’re changing an old vendor library. There are other fixes of you just use composer to update the plugin on the « riche way » (composer update)
from ide-php.
Can confirm this bug. Happened right after I updated to PHP 8.
You can fix this way but you’re changing an old vendor library. There are other fixes of you just use composer to update the plugin on the « riche way » (composer update)
Yes, you're right. That was only a workaround, becouse I got a lot of other errors related to PHP version.
Again, you're right. For the questions of time, I used that workaround. Later, I will use the right way.
from ide-php.
I still have the same error.
I'm pasting it for SEO :
DEBUG The xdebug extension is not loaded
DEBUG Listening on STDIN
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/logan/.atom/packages/ide-php/vendor/netresearch/jsonmapper/src/JsonMapper.php on line 300
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/logan/.atom/packages/ide-php/vendor/netresearch/jsonmapper/src/JsonMapper.php on line 300
from ide-php.
My solution was this after upgrading to php@8:
-Visit https://github.com/cweiske/jsonmapper
-Go to src/JsonMapper.php ( there u will see a 'Add support for PHP 8.0' banner =) )
-Copy the entire getFullNamespace (line 329 to 341)
Till the pull request its done officially this will do the job perfectly
#158
from ide-php.
Related Issues (20)
- Won't properly detect Xdebug HOT 1
- issue in uninstalling ide-php package HOT 1
- not outline visible HOT 3
- Should you write a separate version for atom-ide-community HOT 1
- Crash: xdebug-handler: A non well formed numeric value encountered
- PHP 7.4 support HOT 1
- IDE-PHP and PHP 7.4 not working HOT 1
- ErrorException: Array and string offset access syntax with curly braces is deprecated
- Not compatible to PHP 7.4 using php-fpm and XDEBUG? HOT 1
- Listar funciones de un archivo externo HOT 1
- FelixFBecker initializing for htdocs HOT 1
- ide-php atom package makes some autocorrect packages to not function correctly [Urgent]
- Functions don't fold completely when HEREDOC is used HOT 1
- FelixFBecker keeps initializing HOT 8
- Update JsonMapper.php
- php pakage is not working
- [Feature Request] PHP 8 Support HOT 4
- PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in php 7.4
- Linux Mint: No Paths to PHP Work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ide-php.