Your message dated Sat, 21 May 2016 13:09:57 -0400
with message-id <[email protected]>
and subject line Re: Bug#824175: Error: Class '...\PropertyAccess' not found
has caused the Debian Bug report #824175,
regarding Error: Class '...\PropertyAccess' not found
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
824175: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824175
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: php-symfony-serializer
Version: 2.8.6+dfsg-1
Severity: normal
Dear Maintainer,
I installed php-symfony-serializer and tried the first example from the
documentation at
http://symfony.com/doc/current/components/serializer.html, the code is
like this:
----------------------------------------------------------------------
<?php
require_once('Symfony/Component/Serializer/autoload.php');
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
$encoders = array(new XmlEncoder(), new JsonEncoder());
$normalizers = array(new ObjectNormalizer());
$serializer = new Serializer($normalizers, $encoders);
----------------------------------------------------------------------
And I get this error when running it:
PHP Fatal error: Uncaught Error: Class
'Symfony\Component\PropertyAccess\PropertyAccess' not found in
/usr/share/php/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php:40
Of course the error goes away if I install the
php-symfony-property-access package.
I see that php-symfony-property-access is a suggested package, but I was
wondering it if should be a dependency or a least a recommended
package.
Maybe other users will run into the same error while following the
documentation when trying to use the component for the first time.
Thanks,
Antonio
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (900, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-rc3-ao2 (SMP w/2 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages php-symfony-serializer depends on:
ii php-common 1:40
ii php-symfony-polyfill-php55 1.1.1-1
php-symfony-serializer recommends no packages.
Versions of packages php-symfony-serializer suggests:
pn php-doctrine-annotations <none>
pn php-doctrine-cache <none>
pn php-symfony-config <none>
pn php-symfony-property-access <none>
ii php-symfony-yaml 2.8.4+dfsg-1
-- no debconf information
--
Antonio Ospite
http://ao2.it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
--- End Message ---
--- Begin Message ---
Hi Antonio,
On Sat, May 21, 2016 at 06:02:18PM +0200, Antonio Ospite wrote:
> On Sun, 15 May 2016 11:39:53 -0400 David Prévot <[email protected]> wrote:
> > On Fri, May 13, 2016 at 01:29:46PM +0200, Antonio Ospite wrote:
> > > Package: php-symfony-serializer
> > > Version: 2.8.6+dfsg-1
> > > I installed php-symfony-serializer and tried the first example from the
> > > documentation at
> > > http://symfony.com/doc/current/components/serializer.html, the code is
> > > like this:
> > […]
> > > PHP Fatal error: Uncaught Error: Class
> > > 'Symfony\Component\PropertyAccess\PropertyAccess' not found in
> > > /usr/share/php/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php:40
> >
> > The documentation page you’re referring to already warns about it:
> >
> > “To use the ObjectNormalizer, the PropertyAccess component must also be
> > installed.”
> > This is intended upstream, that only suggests symfony/property-info in
> > their composer.json file.
> >
> > https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Serializer/composer.json
> >
>
> I do see property-access in the file above, maybe the "only" from your
> sentence above refers to the "suggests" part and you meant to write
> symfony/property-access instead of symfony/property-info?
Right, to much symfony/property- for me here, thanks for fixing my
thoughts.
The rationale for the suggests is:
"symfony/property-access": "For using the ObjectNormalizer."
https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Serializer/composer.json#L34
> The whole idea started from the fact that I have a Debian package[1]
> which depends on php-symfony-serializer, and the upstream code uses
> ObjectNormalizer
Then this upstream project does need a fix since Symfony explicitly
documents symfony/property-access needed to use the ObjectNormalizer.
Regards
David
signature.asc
Description: PGP signature
--- End Message ---