sijad / flarum-ext-links

https://github.com/FriendsOfFlarum/links
MIT License
23 stars 9 forks source link

Error when create a link #7

Closed hardware closed 6 years ago

hardware commented 6 years ago

Hi @sijad

We have an error since the last update of your extension when i try to create a new link :

Uncaught TypeError: Argument 1 passed to Sijad\Links\Command\CreateLink::__construct() must be an instance of Flarum\User\User, instance of Flarum\Core\User given

2018/01/14 11:42:07 [error] 445#445: *1628 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Sijad\Links\Command\CreateLink::__construct() must be an instance of Flarum\User\User, instance of Flarum\Core\User given, called in /flarum/app/vendor/sijad/flarum-ext-links/src/Api/Controller/CreateLinkController.php on line 42 and defined in /flarum/app/vendor/sijad/flarum-ext-links/src/Command/CreateLink.php:31
Stack trace:
#0 /flarum/app/vendor/sijad/flarum-ext-links/src/Api/Controller/CreateLinkController.php(42): Sijad\Links\Command\CreateLink->__construct(Object(Flarum\Core\User), Array)
#1 /flarum/app/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(97): Sijad\Links\Api\Controller\CreateLinkController->data(Object(Zend\Stratigility\Http\Request), Object(Tobscure\JsonApi\Document))
#2 /flarum/app/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php(23): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Zend\Stratigility\Http\Request))
#3 /flarum/app/vendor/flarum/core/src/Http/" while reading response header from upstream, client: 172.17.0.10, server: , request: "POST /api/links HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "mondedie.fr", referrer: "https://domain.tld/admin"
/flarum/app # composer show
avatar4eg/flarum-ext-transliterator     0.4.0              Flarum extension. Transliterator for urls.
behat/transliterator                    v1.2.0             String transliterator
clarkwinkelmann/flarum-ext-emojionearea dev-master 4661685 Add EmojiOne Area emoji picker to Flarum
components/font-awesome                 4.7.0              The iconic font designed for use with Twitter Bootstrap.
danielstjules/stringy                   1.10.0             A string manipulation library with multibyte support
davis/flarum-ext-securehttps            0.1.0-beta5        Changes all images using http to https
dflydev/fig-cookies                     v1.0.2             Cookies for PSR-7 HTTP Message Interface.
doctrine/annotations                    v1.6.0             Docblock Annotations Parser
doctrine/cache                          v1.7.1             Caching library offering an object-oriented API for many cache backends
doctrine/collections                    v1.5.0             Collections Abstraction library
doctrine/common                         v2.8.1             Common Library for Doctrine projects
doctrine/dbal                           v2.6.3             Database Abstraction Layer
doctrine/inflector                      v1.3.0             Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer                          v1.0.1             Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
filp/whoops                             2.1.14             php error handling for cool kids
flagrow/passport                        0.1.0-beta.1       The Laravel passport compatible oauth extension
flarum/core                             v0.1.0-beta.7.1    Delightfully simple forum software.
flarum/flarum-ext-akismet               v0.1.0-beta.6      Stop spam using the Akismet anti-spam service.
flarum/flarum-ext-approval              v0.1.0-beta.7      Make discussions and posts require moderator approval.
flarum/flarum-ext-auth-facebook         v0.1.0-beta.6      Allow users to log in with Facebook.
flarum/flarum-ext-auth-github           v0.1.0-beta.6      Allow users to log in with GitHub.
flarum/flarum-ext-auth-twitter          v0.1.0-beta.6      Allow users to log in with Twitter.
flarum/flarum-ext-bbcode                v0.1.0-beta.5      Allow posts to be formatted with BBCode.
flarum/flarum-ext-emoji                 v0.1.0-beta.6      Convert text and unicode emoji into Twemoji.
flarum/flarum-ext-english               v0.1.0-beta.7      English language pack.
flarum/flarum-ext-flags                 v0.1.0-beta.7      Allow users to flag posts for moderator review.
flarum/flarum-ext-likes                 v0.1.0-beta.6      Allow users to like posts.
flarum/flarum-ext-lock                  v0.1.0-beta.7      End a discussion and don't let anyone add further replies.
flarum/flarum-ext-markdown              v0.1.0-beta.5      Allow posts to be formatted with Markdown.
flarum/flarum-ext-mentions              v0.1.0-beta.7      Mention and reply to specific posts and users.
flarum/flarum-ext-pusher                v0.1.0-beta.6      See new discussions and posts in real-time using Pusher.
flarum/flarum-ext-sticky                v0.1.0-beta.7      Pin discussions to the top of the list.
flarum/flarum-ext-subscriptions         v0.1.0-beta.6      Allow users to follow discussions and receive notifications for new posts.
flarum/flarum-ext-suspend               v0.1.0-beta.7      Suspend users so they can't post.
flarum/flarum-ext-tags                  v0.1.0-beta.8      Organize discussions into a hierarchy of tags and categories.
franzl/studio                           0.11.2             Develop your Composer libraries with style
franzl/whoops-middleware                0.4.1             
google/recaptcha                        1.1.3              Client library for reCAPTCHA, a free service that protect websites from spam and abuse.
guzzlehttp/guzzle                       6.3.0              Guzzle is a PHP HTTP client library
guzzlehttp/promises                     v1.3.1             Guzzle promises library
guzzlehttp/psr7                         1.4.2              PSR-7 message implementation that also provides common utility methods
http-interop/http-middleware            0.2.0              Common interface for HTTP middleware
illuminate/bus                          v5.1.41            The Illuminate Bus package.
illuminate/cache                        v5.1.41            The Illuminate Cache package.
illuminate/config                       v5.1.41            The Illuminate Config package.
illuminate/container                    v5.1.41            The Illuminate Container package.
illuminate/contracts                    v5.1.41            The Illuminate Contracts package.
illuminate/database                     v5.1.41            The Illuminate Database package.
illuminate/events                       v5.1.41            The Illuminate Events package.
illuminate/filesystem                   v5.1.41            The Illuminate Filesystem package.
illuminate/hashing                      v5.1.41            The Illuminate Hashing package.
illuminate/mail                         v5.1.41            The Illuminate Mail package.
illuminate/pipeline                     v5.1.41            The Illuminate Pipeline package.
illuminate/support                      v5.1.41            The Illuminate Support package.
illuminate/validation                   v5.1.41            The Illuminate Validation package.
illuminate/view                         v5.1.41            The Illuminate View package.
intervention/image                      2.4.1              Image handling and manipulation library with support for Laravel integration
ircmaxell/random-lib                    v1.2.0             A Library For Generating Secure Random Numbers
ircmaxell/security-lib                  v1.1.0             A Base Security Library
league/flysystem                        1.0.41             Filesystem abstraction: Many filesystems, one API.
league/oauth1-client                    1.7.0              OAuth 1.0 Client Library
league/oauth2-client                    1.4.2              OAuth 2.0 Client Library
league/oauth2-facebook                  1.4.5              Facebook OAuth 2.0 Client Provider for The PHP League OAuth2-Client
league/oauth2-github                    0.2.2              Github OAuth 2.0 Client Provider for The PHP League OAuth2-Client
matthiasmullie/minify                   1.3.58             CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), an...
matthiasmullie/path-converter           1.1.0              Relative path converter
milescellar/flarum-ext-french           v1.1.0             French language pack for Flarum.
mondediefr/flarum-ext-mondedie          dev-master         Custom extension for mondedie.fr
monolog/monolog                         1.23.0             Sends your logs to files, sockets, inboxes, databases and various web services
nesbot/carbon                           1.22.1             A simple API extension for DateTime.
nikic/fast-route                        v0.6.0             Fast request router for PHP
oyejorge/less.php                       v1.7.0.14          PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)
paragonie/random_compat                 v1.4.2             PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/http-message                        1.0.1              Common interface for HTTP messages
psr/log                                 1.0.2              Common interface for logging libraries
pusher/pusher-php-server                2.6.4              Library for interacting with the Pusher REST API
s9e/text-formatter                      0.8.5              Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding media (YouTube, etc...), ...
samdark/sitemap                         2.1.0              Sitemap and sitemap index builder
sijad/flarum-ext-links                  dev-master 3b4452d Manage flarum primary navbar menu links.
sijad/flarum-ext-recaptcha              0.0.2              Google reCAPTCHA for flarum
swiftmailer/swiftmailer                 v5.4.8             Swiftmailer, free feature-rich PHP mailer
symfony/console                         v2.8.33            Symfony Console Component
symfony/debug                           v2.7.40            Symfony Debug Component
symfony/filesystem                      v3.4.3             Symfony Filesystem Component
symfony/finder                          v2.7.40            Symfony Finder Component
symfony/http-foundation                 v2.7.40            Symfony HttpFoundation Component
symfony/polyfill-mbstring               v1.6.0             Symfony polyfill for the Mbstring extension
symfony/process                         v3.4.3             Symfony Process Component
symfony/translation                     v2.7.40            Symfony Translation Component
symfony/yaml                            v2.8.33            Symfony Yaml Component
terabin/flarum-ext-sitemap              v1.0.2-beta.2      Generate a Sitemap for Flarum automatically
tijsverkoyen/akismet                    1.1.1              Akismet is a wrapper-class to communicate with the Akismet API.
tobscure/json-api                       v0.3.0             JSON-API responses in PHP
wiwatsrt/flarum-ext-best-answer         v0.1.0-beta.11     Best Answer for Flarum.
zendframework/zend-diactoros            1.7.0              PSR HTTP Message implementations
zendframework/zend-escaper              2.5.2             
zendframework/zend-stratigility         1.3.3              Middleware for PHP

Poke @magicalex @hydrog3n

Any idea ?

hardware commented 6 years ago

I switched to  0.1.0-beta.6 tag instead of dev-master, now it works.