Download the PHP package eike/yacy without Composer

On this page you can find all versions of the php package eike/yacy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yacy

EXT:yacy

Adds a frontend search to TYPO3 that queries a YaCy peer.

Upgrading from 5.x

The plugins are now content types of their own. TYPO3 13.4 deprecated the list content element with its list_type sub types and v14 removes them, so a plugin registered the old way stops working.

Existing content elements must be migrated: records written by 5.x say CType="list" with list_type="yacy_search" and stop rendering otherwise. The identifiers themselves are unchanged, so TypoScript, page TSconfig and backend layouts referring to yacy_search keep working.

Run this once, after updating:

Backend user groups that allow the plugin need yacy_search added to their "Explicitly allow" list for tt_content.CType; the entry under tt_content.list_type no longer has any effect.

The extension deliberately ships no upgrade wizard. TYPO3 14 moved AbstractListTypeToCTypeUpdate and the UpgradeWizard attribute from EXT:install to EXT:core, and 14.3 no longer provides the old class names at all. A wizard class can therefore only extend the base class of one of the two supported cores, and excluding it from dependency injection - the only way to keep TYPO3 14 from loading it - would also stop TYPO3 13 registering it. The SQL above does the same work on both versions.

If you render the plugin yourself, tt_content.list.20.yacy_search becomes tt_content.yacy_search.

Two things change in the frontend for installs that never touched them:

Loading the TypoScript

From TYPO3 13 on the extension ships a site set. Add it to the site's config.yaml:

The static template ("Yacy Search") still works and can be included the traditional way instead. Either path loads the same files from Configuration/TypoScript/, which you can also @import directly.

Configuration

TypoScript constants under plugin.tx_yacy.settings:

Constant Meaning
protocol, domain, port How to reach the peer from PHP
interface yacysearch.json or yacysearch.rss
resultPage PID the search form submits to
collection Restricts the query to a yacy collection
itemsPerPage Page size of the result list
filter Shows the document kind tabs above the results (default on)
contentDomains Which kinds to offer, comma separated and in that order
facets Which filter categories to show, comma separated and in that order
facetElementLimit Values shown per facet (default 10)
facetsCollapsed Start with the categories folded away (default off)
facetPanelCollapsed Start with the whole filter block put away (default off)
suggestPageType Page type of the suggestion endpoint (default 1589)
suggestMinLength Characters needed before suggestions are fetched

The templateRootPath, partialRootPath and layoutRootPath constants take the usual Fluid override paths.

The extension setting debug (Admin Tools > Settings) makes the request URL visible in the frontend and rethrows peer errors instead of swallowing them. Without it a peer that is unreachable, or that answers with something other than the interface promises, degrades to an empty result list and a log entry.

Filtering the results

The peer returns filter categories alongside every result set - the same ones its own interface shows - and can be asked for one kind of document at a time. Both are rendered above the result list, and both are also listed as removable chips in an "active filters" bar, so a visitor can always get back out of a search they narrowed.

Facets

A facet value is applied by appending its modifier to the query, exactly as the peer's own interface does: clicking "github.com" under Domain turns typo3 into typo3 site:github.com. That has consequences worth knowing:

facets names the categories to show and the order to show them in; an empty value shows everything the peer sent, in its order. A peer answers a common query with a hundred hosts, so facetElementLimit caps the values per category.

The filters fold away at two levels, both plain <details> elements: each category on its own, and the whole block behind a single "Filter results" toggle. Neither needs JavaScript, both are keyboard operable, and both degrade to an open list if the stylesheet never loads.

The two are independent: collapsing the panel says nothing about the categories inside it. A category holding an applied value is always open whatever facetsCollapsed says, otherwise nothing on screen explains why the result set is short — the panel has no such rule, because applied filters stay listed in the chips bar above it either way. Neither state is remembered across page loads.

Names the peer did not send are skipped rather than rendered empty. A value that is already part of the query is shown as plain text instead of a link - the peer marks it by negating the modifier it sends back, and the extension strips that sign so the remove link carries the term that is actually in the query.

Facets reach the templates from both interfaces. The RSS repository parses <yacy:navigation> since 6.0; before that the data arrived only through JSON.

Document kinds

contentdom is a request parameter rather than a query term, so it cannot be applied or removed the way a facet value is - but to a visitor it is one more filter, and it is rendered as tabs next to them.

all is the extension's name for leaving the parameter off. The other five are what yacy accepts; anything else in the list is dropped rather than passed on to the peer, as is a contentDom arriving from the form. Trim the list to what your peer actually has - a peer that has crawled only text pages answers an audio search with nothing, and an empty tab is worse than no tab. Fewer than two usable entries renders no tabs at all.

The chosen kind travels with the search form as a hidden field, so typing a new query keeps it rather than silently dropping back to searching everything.

Suggestions

The search field fetches suggestions from a same-origin TYPO3 page type which proxies the peer's suggest.json. The browser never contacts the peer: a site served over HTTPS cannot call a plain-HTTP peer, and the peer is a foreign origin. Resources/Public/JavaScript/Suggest.js is a dependency-free ES module.

The site configuration needs a route enhancer for the page type, otherwise TYPO3's routing answers the endpoint with a 404:

The search term travels as the plain query parameter tx_yacy_suggest_q, which ext_localconf.php adds to FE.cacheHash.excludedParameters - without that, PageArgumentValidator rejects the request as an un-hashed dynamic argument.

Suggest.js is included through page.includeJSFooter with excludeFromConcatenation and disableCompression. Asset bundlers - the Bootstrap Package among them - otherwise merge it into a bundle and drop the type="module" attribute, which moves it into the head and runs it before the search form exists.

Running the tests

The extension carries a standalone, container based test setup - it does not need a TYPO3 installation around it. Everything runs through Build/Scripts/runTests.sh, which is the same runner the TYPO3 core uses.

Useful variations:

Testing the other supported TYPO3 version

-t selects the core for the install step; the suites then use whatever sits in .Build. Both supported cores run the full unit and functional suites:

TYPO3 PHP testing-framework Fluid
13.4 8.2 - 8.4 9.6 4.x
14.3 8.2 - 8.4 9.6 5.x

composerUpdateMin/Max wipe .Build/vendor first. Switching between the two cores otherwise leaves an autoloader pointing at files of the previous dependency set, which fails with a missing symfony/translation include.

-s rector applies the TYPO3 and PHP upgrade rules from Build/rector/config.php; CI runs it with -n so a pending rule fails the build instead of rewriting code.

Extending the result list

Other extensions can enrich or filter results by listening to Eike\Yacy\Event\BeforeReturnResultsEvent, which every search repository dispatches right before handing the result back:

The event carries the Demand, the current page number and the mutable SearchResult. See EXT:yacy_peoplesearch for a worked example.

Since 5.2 the event is dispatched by the RSS repository as well, not only the JSON one, and it receives the page actually being rendered rather than always 1.

getJson() and setJson() from 5.1 keep working and operate on the same data, presented in the shape of the yacysearch.json payload. A listener written against 5.1 that manipulates $json['channels'][0]['items'] needs no change:


All versions of yacy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
typo3/cms-core Version ^13.4 || ^14.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package eike/yacy contains the following files

Loading the files please wait ...