SyliusResourceBundle icon indicating copy to clipboard operation
SyliusResourceBundle copied to clipboard

Call to a member function isAbstract() on null / ORMTranslatableListener.php

Open imajim opened this issue 5 years ago • 10 comments

Sylius version affected: 1.5.2

Description
I would like create entity witth symfony maker on fresh install sylius:

php bin/console make:entity

 Class name of the entity to create or update (e.g. GrumpyPizza):
 > Voyage\Option

 created: src/Entity/Voyage/Option.php
 created: src/Repository/Voyage/OptionRepository.php

In ORMTranslatableListener.php line 64:
                                                  
  Call to a member function isAbstract() on null  

Steps to reproduce

Possible Solution
in /vendor/sylius/resource-bundle/src/Bundle/EventListener/ORMTranslatableListener.php/ORMTranslatableListener.php on line 64 i've replaced :

if ($reflection->isAbstract()) {
            return;
 }

by

if ($reflection && $reflection->isAbstract()) {
            return;
 }

imajim avatar Jul 07 '19 16:07 imajim

I'm also having this issue, which unfortunately makes aleph a pain to use. Have you had any luck?

jonbca avatar Apr 14 '14 22:04 jonbca

I'm sorry, this fell off my radar. I'll take a look.

On Mon, Apr 14, 2014 at 3:56 PM, Jonathan Abourbih <[email protected]

wrote:

I'm also having this issue, which unfortunately makes aleph a pain to use. Have you had any luck?

— Reply to this email directly or view it on GitHubhttps://github.com/ztellman/aleph/issues/103#issuecomment-40428161 .

ztellman avatar Apr 14 '14 22:04 ztellman

Thanks! If there's anything I can do to help, please let me know.

jonbca avatar Apr 14 '14 23:04 jonbca

It might be because Ring stopped including the dependency on the servlet API in 1.2.x. With my dependencies like:

[[org.clojure/clojure "1.5.1"]
             [lamina "0.5.2"]
             [aleph "0.3.2"]
             [compojure "1.1.6"]
             [javax.servlet/servlet-api "2.5"]]

it seems to be better. I'd appreciate verification though.

jonbca avatar Apr 15 '14 13:04 jonbca

This should no longer be a problem in the latest release.

ztellman avatar Nov 10 '14 18:11 ztellman