public function findByHandleAndVersion($packageHandle, $packageVersion)
    {
        $result = null;
        $packageHandle = (string) $packageHandle;
        if ($packageHandle !== '') {
            $packageVersion = (string) $packageVersion;
            if ($packageVersion !== '') {
                $list = $this->createQueryBuilder('v')
                    ->innerJoin(Package::class, 'p', Expr\Join::WITH, 'v.package = p.id')
                    ->where('p.handle = :handle')->setParameter('handle', $packageHandle)
                    ->andWhere('v.version = :version')->setParameter('version', $packageVersion)
                    ->setMaxResults(1)
                    ->getQuery()->execute();
                if (!empty($list)) {
                    $result = $list[0];
                }
            }
        }

        return $result;
    }
public function findByHandleAndVersion($packageHandle, $packageVersion)
    {
        $result = null;
        $packageHandle = (string) $packageHandle;
        if ($packageHandle !== '') {
            $packageVersion = (string) $packageVersion;
            if ($packageVersion !== '') {
                $list = $this->createQueryBuilder('v')
                    ->innerJoin(Package::class, 'p', Expr\Join::WITH, 'v.package = p.id')
                    ->where('p.handle = :handle')->setParameter('handle', $packageHandle)
                    ->andWhere('v.version = :version')->setParameter('version', $packageVersion)
                    ->setMaxResults(1)
                    ->getQuery()->execute();
                if (!empty($list)) {
                    $result = $list[0];
                }
            }
        }

        return $result;
    }
public function findByHandleAndVersion ( $ packageHandle , $ packageVersion ) { $ result = null ; $ packageHandle = ( string ) $ packageHandle ; if ( $ packageHandle !== '' ) { $ packageVersion = ( string ) $ packageVersion ; if ( $ packageVersion !== '' ) { $ list = $ this -> createQueryBuilder ( 'v' ) -> innerJoin ( Package :: class , 'p' , Expr \ Join :: WITH , 'v.package = p.id' ) -> where ( 'p.handle = :handle' ) -> setParameter ( 'handle' , $ packageHandle ) -> andWhere ( 'v.version = :version' ) -> setParameter ( 'version' , $ packageVersion ) -> setMaxResults ( 1 ) -> getQuery ( ) -> execute ( ) ; if ( ! empty ( $ list ) ) { $ result = $ list [ 0 ] ; } } } return $ result ; }
Find a version given the package handle and the version.

@param string $packageHandle
@param string $packageVersion

@return \CommunityTranslation\Entity\Package\Version|null
Find a version given the package handle and the version .