I'm trying to run an application on an HHVM 3.2 server and I'm getting a 'InvalidArgumentException Unknown setter '_date_time' error. It seems to have something to do with the magic functions. It also looks like it's coming from Carbon and due to the sessions being created.
I'm using Redis database for session management since I'm using HAPROXY for load balancing. Anyone else come across this issue and is there a fix?
Oddly I have another Laravel 4.2 (earlier version) application running on the same setup and it runs fine.
Here is the stack error:
InvalidArgumentException …/vendor/nesbot/carbon/src/Carbon/Carbon.php542
Carbon\Carbon __set <#unknown>0
DateTime __sleep <#unknown>0
serialize …/vendor/laravel/framework/src/Illuminate/Session/Store.php222
Illuminate\Session\Store save …/vendor/laravel/framework/src/Illuminate/Session/Middleware.php126
Illuminate\Session\Middleware closeSession …/vendor/laravel/framework/src/Illuminate/Session/Middleware.php79
Related
Today I have identified a bottleneck in my Symfony application. The problem is that Symfony calls Doctrine\Common\Annotations\CachedReader::getMethodAnnotations() over 4000 times (for every request, in production mode).
I looked at the callstack and these calls are a result of Symfony\Component\Routing\Loader\YamlFileLoader::load() which is called by Symfony\Bundle\FrameworkBundle\Routing::getRouteCollection(). This seems to be the core issue - it seems the RouteCollection is not cached.
After some research I found this comment by #stof saying that RouteCollection should not be used at runtime.
The runtime usage of RouteCollection is done by the CsrfRouteBundle. To be precise it's used here and here. Does this mean that the approach used by this bundle is wrong? In that case what solution do you use for CSRF in symfony?
in my current project i use doctrine and a listener, checking for certain changes to trigger cache-invalidation.
In my test, due to the use of $entityManager->getUnitOfWork()->getEntityChangeSet($entity) i get the following error:
Returning by reference not supported
The underlying code for this is inside the Doctrine class UnitOfWork:
public function & getEntityChangeSet($entity)
{
which i obviously won't/can't change.
The code that calls it already worked in production:
$args->getEntityManager()->getUnitOfWork()->getEntityChangeSet($entity)
I updated to the latest stable PHPUnit version that we support (4.8) and can't go higher since then i'd had to rewrite all tests (due to serveral methods that became deprecated).
How do i solve this problem?
I believe you may use doctrine/orm of version 2.5.
It has not this passing by reference, only master holds it
When I throw new Exception('test exception'); from a class the bug is passed to my rollbar dashboard. But when I cause a Laravel error, something like:
"syntax error, unexpected '$user' (T_VARIABLE)"
it doesn’t get passed.
I have it working perfectly on another project and it sends all bugs but that is in Laravel 5.0. I then tried Laravel Rollbar by jenssegers, thinking it would be more suited for Laravel 5.1 but that behaves the exact same way, only passing exceptions that I explicitly throw.
Try removing any third party packages that would interfere with the Handler class in the exceptions directory. The likes of filp/whoops could be catching the exception first.
After updating to Symfony 2.7 I've got deprecated notification in my profiler. Here it is:
It looks like an internal Symfony stuff. Any ideas about how to fix it or it will be fixed in next Symfony patches?
It seems that the issue is located at the "AllowedMethodsRouterLoader" class. This might be an external bundle, so you might be able to update this bundle. If it's your own class, it's as easy as just changing it to using ->getPath() instead of using the ConfigCache instance as a string.
After inheriting some Zend Framework code it didn't work, after lots of fiddling I've managed to create the schema and rebuild the models, although now I'm getting the following error:
Call to undefined method Criteria::hasSelectClause() in home/richard/library/om/BaseDomainPeer.php on line 329
Why would propel generate files that call unknown methods?
I would think that you have a name collision and you load some other class called Criteria and you don't realize it because of autoloading. Try dumping the methods using get_class_methods()
Turns out the code was built on a system using the beta version of propel, when i forced my system to use the beta version, it worked.
to use the beta version, go here