Just a quick one.
Because it’s CurrentYear, I’ve updated the Known vagrant build to support PHP 7.3.
The default branch is now PHP 7.2, and there’s now a separate branch for PHP 7.3 support.
Have fun!
Just a quick one.
Because it’s CurrentYear, I’ve updated the Known vagrant build to support PHP 7.3.
The default branch is now PHP 7.2, and there’s now a separate branch for PHP 7.3 support.
Have fun!
Some important changes to Known were merged in over the weekend.
Most notably, (most) external dependencies are now managed and installed via Composer, and not included natively in the repository itself.
This makes updates easier to manage, but it does mean that if you are installing from (or more importantly, upgrading from) the git repository directly, you will need to perform an extra step.
cd /path/to/known; composer install
This is particularly important if you’re upgrading, and your site is a checkout of the git repo.
Composer was the big one, but there have been a number of other important changes you should probably be aware of, especially if you write code for Known:
You can now put your custom plugins in a separate IdnoPlugins.local directory. This works exactly like IdnoPlugins, but gives us a way of nicely separating custom code from package code.
File systems now support
for storing content to a file from a variable in memory.storeContent()
This must be implemented by any class that implements this interface, therefore if you maintain a FileSystem plugin, you’ll need to update your code.
SQLite is not widely used, and supporting it introduces a fair amount of technical debt.
Support is now deprecated, and will be removed in a future release.
The Interplanetary File System (IPFS) is a distributed, peer to peer, file system. It’s pretty cool. So, here’s an experimental plugin that adds backend file system support for this protocol for Known.
Currently this functions as a drop in replacement for the Known file storage system, along the same lines as the S3 plugin. It’ll store photos, profile pictures, and any other stored data to IPFS instead of on the local file system, or in Mongo (if you’re using Mongo).
You’ll need an IPFS server to talk to. For development I installed go-ipfs, so you can use that, or one of the public ones.
Next, copy the IPFS directory to your
directory, and activate it.IdnoPlugins
By default, the plugin is set up to talk to
but you probably don’t want to do that forever, so update your localhost
as follows:config.ini
[IPFS] host = 'servername' port = 1234 apiport = 5678
Replace the values accordingly, but make sure you keep the [IPFS]
section header.
At the moment, this is a drop in functional replacement for file storage, and doesn’t go into some of the cooler things you can do with Content-Addressable storage.
As pointed out in this ticket, an obvious improvement would be to cache stuff from the image proxy to IPFS (which already takes place), but to directly reference them via their content hash (which doesn’t currently take place), as this should be more efficient.
Anyway, that’s future development and would require some core hooks. I’ll get to that next, I’m sure.
Anyway, kick the tires and let me know your thoughts. Pull requests more than welcome!