Interesting question! Victor Hugo opposed the corruption within the Catholic Church rather than the institution itself. If we rely on the text of his novel Les Miserables, we can see that this is true. Take, for instance, the incomparable Bishop Myriel: he is the reason for Jean Valjean's exceptional spiritual transformation. Bishop Myriel, however, is the antithesis of members of the clergy during Hugo's time.
For his part, Hugo relinquished his Catholic faith in his later years. Historians maintain that he became a sort of rational Deist. Hugo kept his faith in God but chose to separate himself from organized Catholicism. In that sense, he opposed the Catholic Church. More specifically, however, Hugo opposed the corruption within the hierarchy of the church. Members of the clergy were predominantly focused on retaining their wealth and influence. They cared little for the working poor.
It is not a coincidence that the June Rebellion is mentioned in Hugo's Les Miserables. In the story, the Friends of the ABC participate in an anti-monarchical rebellion prior to the June 5th uprising. The June 5th mutiny in the story refers to the actual June Rebellion, which occurred from June 5th to June 7th in 1832. The Friends of the ABC in Les Miserables is a fictional organization consisting of French republican students.
During the actual June Rebellion in 1832, it was Parisian republicans who staged an anti-monarchical insurrection against the French monarchy. For his part, Hugo supported the republicans. At the time of the rebellion, France was in great turmoil. The average citizen endured famine, disease, and privations of every sort. Meanwhile, the resplendent monarchy continued on as before, with little thought of solving the challenges faced by the populace.
By 1832, tempers had boiled over. Understand that the French Revolution of 1789 was meant to topple the monarchy. By 1832, the monarchy was still entrenched in power. Additionally, the monarchy was supported by the Catholic Church. In fact, both institutions worked together to protect their common interests. When Hugo threw his support behind the French republicans, he was vilified by the Catholic Church.
Hugo's mention of the June Rebellion in Les Miserables led his work to be listed in the Church's Index Librorum Prohibitorum (List of Prohibited Books). All books or publications listed on the Index were banned for general use by the Catholic faithful. Ever mindful of the suffering of the working classes, Hugo parted ways with the Church. For the rest of his life, he remained fully committed to exposing its excesses. In that sense, Hugo was opposed to the Catholic Church.