Testumgebung / Fehlermeldung

Guten Morgen, ich habe eine Shopinstallation kopiert und erhalte nun folgende Meldung: Parse error: syntax error, unexpected ‘public’ (T_PUBLIC) in /kunden/117539_01231/webseiten/test1/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php on line 49 Leider bekomme ich nicht mehr infos raus. hat jemand eine Idee? Danke

Hier muss was beim Kopieren schief gelaufen sein. Einen syntax error kann ich mir nicht anders erklären… Ansonsten poste doch mal die Query.php. Viele Grüße

Syntaxfehler kann ich eig. ausschließen. Sieht alles okay aus. Hier der Inhalt. [code]<?php /*

  • THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

  • “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

  • LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

  • A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

  • OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

  • SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

  • LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

  • DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

  • THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

  • (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

  • OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  • This software consists of voluntary contributions made by many individuals

  • and is licensed under the MIT license. For more information, see

  • http://www.doctrine-project.org. */ namespace Doctrine\ORM; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\DBAL\LockMode; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\ParserResult; use Doctrine\ORM\Query\QueryException; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Query\ParameterTypeInferer; /** * A Query object represents a DQL query. * * @since 1.0 * @author Guilherme Blanco

  • @author Konsta Vesterinen ;
    $this->_state = self::STATE_DIRTY;

     return $this;
    

    }

    /**

    • Gets the maximum number of results the query object was set to retrieve (the “limit”).
    • Returns NULL if {@link setMaxResults} was not applied to this query.
    • @return integer Maximum number of results.
      */
      public function getMaxResults()
      {
      return $this->_maxResults;
      }

    /**

    • Executes the query and returns an IterableResult that can be used to incrementally

    • iterated over the result.

    • @param ArrayCollection|array|null $parameters The query parameters.

    • @param integer $hydrationMode The hydration mode to use.

    • @return \Doctrine\ORM\Internal\Hydration\IterableResult
      */
      public function iterate($parameters = null, $hydrationMode = self::HYDRATE_OBJECT)
      {
      $this->setHint(self::HINT_INTERNAL_ITERATION, true);

      return parent::iterate($parameters, $hydrationMode);
      }

    /**

    • {@inheritdoc}
      */
      public function setHint($name, $value)
      {
      $this->_state = self::STATE_DIRTY;

      return parent::setHint($name, $value);
      }

    /**

    • {@inheritdoc}
      */
      public function setHydrationMode($hydrationMode)
      {
      $this->_state = self::STATE_DIRTY;

      return parent::setHydrationMode($hydrationMode);
      }

    /**

    • Set the lock mode for this Query.

    • @see \Doctrine\DBAL\LockMode

    • @param int $lockMode

    • @return Query

    • @throws TransactionRequiredException
      */
      public function setLockMode($lockMode)
      {
      if (in_array($lockMode, array(LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE))) {
      if ( ! $this->_em->getConnection()->isTransactionActive()) {
      throw TransactionRequiredException::transactionRequired();
      }
      }

      $this->setHint(self::HINT_LOCK_MODE, $lockMode);

      return $this;
      }

    /**

    • Get the current lock mode for this query.

    • @return int
      */
      public function getLockMode()
      {
      $lockMode = $this->getHint(self::HINT_LOCK_MODE);

      if ( ! $lockMode) {
      return LockMode::NONE;
      }

      return $lockMode;
      }

    /**

    • Generate a cache id for the query cache - reusing the Result-Cache-Id generator.

    • The query cache

    • @return string
      */
      protected function _getQueryCacheId()
      {
      ksort($this->_hints);

      return md5(
      $this->getDql() . var_export($this->_hints, true) .
      ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : ‘’) .
      ‘&firstResult=’ . $this->_firstResult . ‘&maxResult=’ . $this->_maxResults .
      ‘&hydrationMode=’.$this->_hydrationMode.‘DOCTRINE_QUERY_CACHE_SALT’
      );
      }

    /**

    • Cleanup Query resource when clone is called.

    • @return void
      */
      public function __clone()
      {
      parent::__clone();

      $this->_state = self::STATE_DIRTY;
      }
      }

[/code]

Haeb nun noch mal den kompletten ORM Ordner aus den original Shopware Quellen geladen und überschrieben. Nun geht es :slight_smile:

In deiner Datei ist ein syntax Fehler: die Klassendefinition “class Query” fehlt… Viele Grüße

1 „Gefällt mir“