Coder Social home page Coder Social logo

Problems with PHP7.2 about php-reports HOT 17 OPEN

kevin201 avatar kevin201 commented on September 14, 2024
Problems with PHP7.2

from php-reports.

Comments (17)

hellifiknow avatar hellifiknow commented on September 14, 2024

I have been able to update it to work with PHP 7.2, so I may be able to help. What version of Twig and Flight are you using?

from php-reports.

kevin201 avatar kevin201 commented on September 14, 2024

I'm not at work at the moment, but if I recall correctly the main problem was solved by relaxing the requirements in the lock file. I couldn't get Twig 2 to play, but a later version of 1.x worked ok. Any more info on what tweaks you made would be interesting.

from php-reports.

kevin201 avatar kevin201 commented on September 14, 2024

Twig: const VERSION = '1.24.1-DEV';
Flight: 1.2.20

from php-reports.

apropos avatar apropos commented on September 14, 2024

@kevin201 can you please post composer files that work with php 7.2?

from php-reports.

hellifiknow avatar hellifiknow commented on September 14, 2024

@kevin201 Try upgrading the version of Flight you are using to 1.3.7 and upgrade the version of Twig you are using to 1.37.1.

from php-reports.

apropos avatar apropos commented on September 14, 2024

I keep getting the following error.
PHP Fatal error: Cannot declare class Flight, because the name is already in use in /var/www/xxxx/vendor/mikecao/flight/flight/Flight.php on line 53

from php-reports.

hellifiknow avatar hellifiknow commented on September 14, 2024

@apropos What version of Flight are you using?

from php-reports.

apropos avatar apropos commented on September 14, 2024

I figured out the problem with class declaration. Removing Flight from autoload solved it.

@hellifiknow the one you suggested, 1.3.7 and Twig 1.37.1
"require": {
"twig/twig": "1.37.1",
"swiftmailer/swiftmailer": "5.",
"mikecao/flight": "1.3.7",
"jdorn/sql-formatter": "dev-master",
"jdorn/file-system-cache": "dev-master",
"phpoffice/phpexcel": "dev-develop",
"adodb/adodb-php": "dev-master",
"lespoilus/spyc": "dev-master",
"google/apiclient": "1.0.
@beta"
},

from php-reports.

apropos avatar apropos commented on September 14, 2024

@hellifiknow thanks for the help.
Now the problem I'm having is following.

500 Internal Server Error
Trying to get property 'report' of non-object (8)

#0 /var/www/html/xxx/data_reports/lib/PhpReports/PhpReports.php(189): flight\Engine->handleError(8, 'Trying to get p...', '/var/www/html/w...', 189, Array)
#1 /var/www/html/xxx/data_reports/index.php(82): PhpReports::displayReport('daily_gross_rep...', 'html')
#2 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(169): {closure}('html')
#3 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(145): flight\core\Dispatcher::callFunction(Object(Closure), Array)
#4 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Engine.php(340): flight\core\Dispatcher::execute(Object(Closure), Array)
#5 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->_start()
#6 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(144): flight\core\Dispatcher::invokeMethod(Array, Array)
#7 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(49): flight\core\Dispatcher::execute(Array, Array)
#8 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Engine.php(92): flight\core\Dispatcher->run('start', Array)
#9 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->__call('start', Array)
#10 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Flight.php(77): flight\core\Dispatcher::invokeMethod(Array, Array)
#11 /var/www/html/xxx/data_reports/index.php(102): Flight::__callStatic('start', Array)
#12 {main}

from php-reports.

hellifiknow avatar hellifiknow commented on September 14, 2024

Try clearing out the cache directory. Possibly it was cached before you updated and the cache has an old version.

from php-reports.

apropos avatar apropos commented on September 14, 2024

i remove the whole vendor directory and do composer update --no-dev each time.

from php-reports.

hellifiknow avatar hellifiknow commented on September 14, 2024

There is a directory that gets created named 'cache' at the same level as the vendor directory. Just run sudo rm -r cache to clear it out.

from php-reports.

apropos avatar apropos commented on September 14, 2024

@hellifiknow I've reinstalled php-reports and that seems to have fixed the issues. Thanks so much for the help!

from php-reports.

hellifiknow avatar hellifiknow commented on September 14, 2024

@apropos Cool! Glad I could help.

from php-reports.

eotin avatar eotin commented on September 14, 2024

@hellifiknow thanks for the help.
Now the problem I'm having is following.

500 Internal Server Error
Trying to get property 'report' of non-object (8)

#0 /var/www/html/xxx/data_reports/lib/PhpReports/PhpReports.php(189): flight\Engine->handleError(8, 'Trying to get p...', '/var/www/html/w...', 189, Array)
#1 /var/www/html/xxx/data_reports/index.php(82): PhpReports::displayReport('daily_gross_rep...', 'html')
#2 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(169): {closure}('html')
#3 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(145): flight\core\Dispatcher::callFunction(Object(Closure), Array)
#4 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Engine.php(340): flight\core\Dispatcher::execute(Object(Closure), Array)
#5 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->_start()
#6 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(144): flight\core\Dispatcher::invokeMethod(Array, Array)
#7 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(49): flight\core\Dispatcher::execute(Array, Array)
#8 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Engine.php(92): flight\core\Dispatcher->run('start', Array)
#9 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/core/Dispatcher.php(198): flight\Engine->__call('start', Array)
#10 /var/www/html/xxx/data_reports/vendor/mikecao/flight/flight/Flight.php(77): flight\core\Dispatcher::invokeMethod(Array, Array)
#11 /var/www/html/xxx/data_reports/index.php(102): Flight::__callStatic('start', Array)
#12 {main}

Hi, I'm having the same issue but can't fix it. Could you please provide me some help, maybe by providing you composer file ? Thanks a lot

from php-reports.

apropos avatar apropos commented on September 14, 2024

Hi, I'm having the same issue but can't fix it. Could you please provide me some help, maybe by providing you composer file ? Thanks a lot

I resolved the issue by reinstalling php-reports and here's the current composer.json
{
"name": "jdorn/php-reports",
"description": "A PHP framework for displaying reports from any data source, including SQL and MongoDB",
"homepage": "http://jdorn.github.com/php-reports/",
"keywords": ["reports", "mongodb", "sql", "reporting", "csv", "database"],
"license": "LGPL-3.0+",
"authors": [
{
"name": "Jeremy Dorn",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3",
"ext-pdo": "",
"twig/twig": "1.37.1",
"swiftmailer/swiftmailer": "5.
",
"mikecao/flight": "1.3.7",
"jdorn/sql-formatter": "dev-master",
"jdorn/file-system-cache": "dev-master",
"phpoffice/phpexcel": "dev-develop",
"adodb/adodb-php": "dev-master",
"lespoilus/spyc": "dev-master",
"google/apiclient": "1.0.*@beta"
},
"autoload": {
"files": [
"lib/adodb/pivottable.inc.php"
],
"classmap": [
"vendor/jdorn/file-system-cache/"
]
},
"minimum-stability": "dev"
}

from php-reports.

russell-hutson-jp avatar russell-hutson-jp commented on September 14, 2024

twig 1.44.7 works for me on PHP 7.4.3

from php-reports.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.